Lightning starts when the atmosphere becomes electrically charged. This occurs when opposite charges begin building between the clouds and the ground.
The charge can also occur between clouds alone or between the clouds and the air. These sparks of electricity equalize the positive and negative charges occurring between the ground and the clouds. The equalization is only temporary, however, as the charges build up again during thunderstorms. Because the atmosphere is an excellent electrical insulator, the charges have to build significantly to create the lighting. Lightning strikes at random and it is impossible to predict exactly where lighting will hit.