Conditions of Thunderstorms
For lightning to form there has to be a rising current of air within the cloud, carrying ice crystals and water droplets upwards. The droplets become hail, and start to fall as the air becomes thinner, rubbing some electrons off the minute ice crystals, which continue to rise, now positively charged. The soft hail falls to lower levels and is now negatively charged. Positive and negative charges have a great attraction for each other, as the electromagnetic force is almost unbelievably powerful.

Air is a bad conductor, so although the separated charges gradually build up they won't recombine until the build-up of charge is sufficiently strong to overcome the resistance of the air. Leaders from the oppositely charged regions are constantly probing for a viable passage where a lightning flash can get through to recombine their positive and negative charges.

Sometimes a way is found where the build-up of charge is sufficiently strong to overcome air resistance and a lightning stroke occurs, but if the charge build up is not sufficiently strong no spectacular flash will occur. Instead, the separated charges gradually leak away until charge equilibrium is established. So although it may seem to you that conditions are right for lightning to occur, that may not actually be the case.

More unusually, separation of charge can also happen in dry conditions like dust storms and forest fires, where rising dust particles take the place of water. A vaguely similar process of charge separation takes place in a Van der Graaf generator, which can produce artificial miniature lightning discharges.