Light travels faster than sound. The speed of light in a vacuum is approximately 299,792 kilometers per second (or about 186,282 miles per second). In contrast, the speed of sound in air is much slower, at about 343 meters per second (or roughly 1,235 kilometers per hour) at room temperature.
The reason for this difference lies in the nature of how light and sound travel. Light is an electromagnetic wave and does not require a medium to propagate, allowing it to travel through the vacuum of space. Sound, on the other hand, is a mechanical wave that requires a medium, such as air, water, or solids, to travel. The molecules in the medium vibrate to transmit sound, which is a much slower process compared to the propagation of light.
This is why you often see lightning before you hear thunder during a storm. The light from the lightning reaches your eyes almost instantly, while the sound of thunder takes several seconds to travel the same distance.