How can I integrate microphone and speaker into my microcontroller project?
Your sample rate must be twice the maximum frequency of interest. This is the Nyquist–Shannon sampling theorem. If you want hi-fidelity audio, your maximum frequency is the limit of human hearing, about 20kHz. Human voice is less demanding: telephone networks work up to about 3400 Hz.

You will find that the AVR's ADC isn't terribly fast, and you don't have much resources to process the data. So probably, your hardware limitations will dictate the sample rate for you.

You probably don't need to worry about codecs. A codec encodes and decodes an audio stream. A common thing to do is compress the audio for more efficient storage or transmission, but it doesn't sound like you are doing either. There are codecs that encode and decode for reasons other than compression, but I can't think of any that would be relevant here. Your computing resources are very limited on the microcontroller anyway, and you won't have much time for encoding or decoding anyway.