If you know that the speed of sound is 340m/s then you can work out how far away a thunderstorm is from your position.
The video below taken from Mr Mackenzie`s wonderful fizzics website. shows a thunderstorm in progress.
Time how long the thunder comes after the flash and use this time to calculate how far the thunderstorm is away.
Lightning from Daniel Dingemanse on Vimeo.