As the clouds float around the small particles in side rub against one another exchanging electrons (static electricity). As this 'rubbing' goes on the charges continue to build to massive amounts. If enough of a charge is developed (that is, enough to overcome the natural electrical resistance of air), then a static discharge takes place. That's lightning!