Often we see a flash of lightning, but do not hear the thunder. As a rule, thunder has a short range of detection — usually less than 25 km (15 miles). Why?
The speed of a sound wave in air depends on the temperature of the air. The higher the temperature of the air, the sound wave will travel faster.
Thunderstorms are most likely to form when the temperature of the air decreases with height. This means that the part of the sound wave closest to the ground is traveling the fastest and the part of the wave farthest above the ground is traveling the slowest. As a result, the sound wave will be refracted upwards, and therefore will be heard over shorter distances.