On some occasions this may be due to the sounds being reflected off an interface between warmer air above and colder air below, which the weather people call an "inversion." Normally the air is cooler the higher you go, but on a clear night, with no clouds to reflect the radiation back, the ground loses heat by radiation and so gets colder than the air adjacent to it, and so cools that air. If there is very little wind to stir the atmosphere up, an interface forms between the cold air and the warmer air above, and sound waves can be relected off this, and so carry a long way.