Lightning is essentially a gigantic electrical spark that results from billions of volts of natural static electricity. Lightning is usually associated with thunderstorms and rain. Most meteorologists will agree that ice formation in clouds is a key factor for starting the "electric generator" that produces lightning. There are several theories as to how lightning is produced. It seems the best one so far [called the "Charge Reversal Concept"] requires that falling graupel (small ice pellets) become negatively charged while small supercooled cloud droplets that strike then bounce off the graupel become positively charged. Cloud temperature can affect the "charge sign" of the graupel. If the temperature is below -10C then the graupel takes a negative charge and the supercooled cloud droplets take a positive charge. The supercooled cloud droplets rise on updrafts to the top of the storm while the graupel pellets fall and melt in the lower regions of the storm.
Lightning Safety Facts from NOAA.

UHF Television Signals easily reflect the electrical path ways that lightning creates! Tune your hand-held scanner (or TV) to the sound carrier frequency of a 200 to 300 mile distant UHF TV station in the range of CH 14 to CH 21 (you should NOT be able to receive the station at all under normal weather conditions!) When lightning flashes, sometimes you will hear about 1/4 second of the TV station's sound! We discovered this during an experiment by tuning a hand-held scanner to 475.750 MHz which is the sound carrier for UHF TV Channel 14 (normally "dead"here). We heard TV "sound blips" instead of the UHF lightning signatures we were looking for! Do not experiment when lightning is nearby!
Weather Books You Need To Read!
If you want to learn more about lightning and other interesting weather facts and phenomena thenbuy these books from your local book store:
"STORMS" by William R. Cotton, PH.D. Published by ASTeR Press. PO Box 466, Fort Collins, CO 80522. {1990 First Edition.}........ISBN:0-9625986-0-7.
"Sky Watch East" and "Sky Watch West" by Richard A. Keen. Published by Fulcrum Publishing350 Indiana Street, Suite 350; Golden, CO 80401......{East}: ISBN:1-55591-091-2 ; {West}:ISBN: 1-55591-019-X.
"Weather: Understanding the Forces of Nature" by Louise Quayle. Published by Cresent Books distributed by Crown Publishers, Inc. 225 Park Avenue South, New York, NY10003.....ISBN: 0517-67663-X.
"This Blue Planet" by Janice Miller. Published by the Moody Bible Institute. [This book is a hard-cover 'rare find'! Obtain it while you still have time!].....ISBN:0-8024-8181-7.