The reason people see lightning first before hearing thunder is related to the speeds of light and sound. The speed of light, which is approximately 190,000 miles per second is much faster than the speed of sound at 1,000 feet per second.
Lightning occurs when negative electric charges at the bottom of a thundercloud connect with positive electric charges on the ground. The formation of the electric charges in a thundercloud happens when water and ice particles collide in the cloud. Lightning causes thunder. When the massive heat from the lightning causes the surrounding air to first expand and then contract, this forms a sonic wave that is heard as thunder.
In order to determine the distance of storm, it is necessary to count the time interval between the lightning and the thunder sound in seconds and divide this number by five. This gives a distance estimate in miles.