If you've ever watched lightning flicker in the night sky and then counted how many seconds it took for the thunder to reach your ears, you already know that light travels much more rapidly than sound. That doesn't mean that sound travels slowly either; at room temperature a sound wave is traveling at over 300 meters per second (more than 1,000 feet per second). The speed of sound in air varies depending on several factors, including humidity.
Imagine an air molecule careening across space and crashing into a neighbor so that they bounce off each other like a pair of rubber balls. The second molecule now rushes off until it collides with another and so on. Each of these collisions transfers energy from the first molecule to the second. This is how sound waves travel: air molecules are forced into motion by a disturbance like the vibration of the vocal cords in your throat, and collisions transfer that energy from the first set of air molecules to their neighbors and so on outward. Ultimately, the wave transfers energy but not matter, meaning it is the disturbance that is traveling rather than the air molecules themselves.
When you talk about the speed of sound, you're talking about how much time it takes for the sound wave or disturbance to go from the place where it began to your ear. The speed of a sound wave is determined by the medium or material through which the wave is traveling; the same wave will go faster in helium than it does in air, for example. Each material has two properties that determine how rapidly it transmits sound: its density and its rigidity or elastic modulus.
The "rigidity" of air or its elastic modulus does not change with humidity. Density, however, does. As the humidity increases, so too does the percentage of air molecules that are water molecules. Water molecules are much less massive than oxygen, nitrogen or carbon dioxide molecules, and so the greater the fraction of air that is made up of water vapor, the less mass per unit volume, and the less dense the air becomes. Lower density translates into faster sound wave travel, so sound waves travel faster at high humidity. The increase in speed, however, is very small, so for most everyday purposes you can ignore it. In room temperature air at sea level, for example, sound travels about 0.35 percent faster in 100 percent humidity (very humid air) than it does in 0 percent humidity (completely dry air).
The effect of humidity on the speed of sound is slightly greater at lower air pressures, like those you experience at high altitude. At about 6,000 meters (20,000 feet) above sea level, for example, the difference between the speed of sound in room temperature dry air at 0 percent humidity and the same air at 100 percent humidity is about 0.7 percent. Increasing temperature also magnifies the effect of humidity on the speed of sound in air, although again the increase is relatively modest.