Lightning occurs when a massive electrical discharge takes place between two oppositely charged clouds. It may also occur when this discharge is between the ground and a charged cloud.The charges develop in thunder clouds due to the friction of water droplets with air as the droplets move up and down with the rising and descending air currents within the cloud. During a bolt of lightning, thousands of amperes of electricity flows through the air in a fraction of a second. This rapidly heats up die air along its path which expands very fast producing shock waves which we hear as thunder. Although the lightning and thunder are produced at the same instant, we hear the thunder later because light (3,00,000 km per second) travels faster than sound (343.2 metres per second).