For the simplistic explanation:
The air gas particles of the gasses that compose air (on earth where we live) are always moving, bouncing around and banging into each other.
Warmer air gas particles have more energy than colder molecules and so they bounce around more. They require more room to bounce around, and have more space between them. In warmer air, more water vapor molecules (since there is more room between air gas particles) can get in between the air gas particles.
As air gets colder, the reverse happens and a given space can hold more air gas particles but less water vapor.
In colder air, the gas particles are more densly packed and can transmit sound better.
In warm humid air, water vapor "adds particles to the mix, and so can transmit sound better than warm dry air.
A liittle aside:
Heating of the earth, which in turn heats the atmosphere, is responsible for the motions and movements of the air in the atmosphere. The faster molecules move, the hotter the air. As the molecules heat and move faster, they are moving apart. So air, like most other substances, expands when heated and contracts when cooled. Because there is more space between the molecules, the air is less dense than the surrounding matter and the hot air floats upward.