Have you ever seen flashes of lightning without hearing any thunder? This kind of lightning is called "heat lightning". What exactly is it?
Heat lightning is in fact produced by storms that are so far away that you can see the lightning but the sound of the thunder cannot reach where you are.
This is why: the speed of light (about 300,000,000 m/s) is extremely fast compared with the speed of sound (around 300 m/s). Moreover, the thunderclap and its wave are more easily dissipated while propagating, so that when the distance is too great the thunder can no longer be heard.