Why?

The answer

Light travels almost a million times faster than sound, so the flash reaches you nearly instantly and the thunder arrives later.

A lightning bolt heats the air around it to as much as about 28,000 °C (50,000 °F) in a fraction of a second, several times hotter than the surface of the Sun. The air expands so suddenly that it makes a shock wave, which spreads out as the sound we call thunder.

The flash and the shock wave start at the same moment, but they travel at wildly different speeds. Light moves at about 300,000 km per second. Sound in air moves at about 343 metres per second.

So the light reaches you almost instantly, and the sound arrives about 3 seconds later for every kilometre between you and the strike (about 5 seconds for every mile).

That gives a simple trick: count the seconds from flash to boom and divide by 3 to get the distance in kilometres. If the gap is short, the storm is close. Safety experts say: when thunder roars, go indoors, because lightning can strike as far as about 16 km (10 miles) from a storm.

Go deeper

Why? Why does thunder rumble instead of making one bang?

A lightning bolt can be several kilometres long. Sound from the nearest part reaches you first and sound from farther parts arrives later, and it also echoes off hills and buildings, which stretches one bang into a long rumble.

Why? Why can't you hear thunder from very far away?

Thunder can usually be heard up to about 16 km (10 miles) away. Beyond that the sound has spread out and faded, and warm air near the ground tends to bend it upward, over your head, so you might see distant lightning in silence.

Why? Why is light so much faster?

Sound is a wave of air molecules bumping into each other, so it can only go as fast as they pass the push along. Light doesn't need anything to travel through, and nothing moves faster than it.

Sources