Both sound and light energy are released at the same time. In air the speed of light is 300000000 m/s and speed of sound is 340 m/s. Hence the light reaches the observer instantly and sound after some time.
For example, if an electric discharge between the clouds takes place at a distance of 1km from the observer then lightning flash is seen instantly but sound of thunder will be heard after about 3 seconds.