Sound is slower than light, both the sound (thunder) and the light (lightning) are created at the exact same time, but the light travels much faster than the sound so you see the lightning first.The speed of sound in air is about 340 m/s and the speed of light is about 3 * 10^8 m/s. So when lightning takes place, the thunder can be seen much earlier than the sound is heard as the light from the thunder reaches the earth’s surface much earlier then the sound. sound wave also very with medium dencity, it's(wave) directly praposnal to density. if density rise then you heaed maximum sound and in vaccum no sound hear while you near to the sound object.!!