The rumble of thunder is caused by the noise passing through layers of the atmosphere at different temperature. Thunder lasts longer than lightning because of the time it takes for the sound to travel from different parts of the flash.