What Causes Lightning?
Lighning is an elecrical charge that builds up in specific types of clouds. The thing that causes lightning is when tiny frozen rain drops bump into each other in the air and when this happens many times it makes an electric charge fillling the cloud. this charge also builds up on tall things beneath the cloud the electrical charge then meet up forming lightning.
The Scientific Explanation
In a storm cloud strong winds cause frozen ice particles to collide. The smaller ones lift to the top of the cloud and the larger ones settle at the bottom. While this happens the small particles take on a positive charge and the large ones take on a negative charge. As the negative charge gets stronger at the bottom of the cloud it drives away all the negative charge below and attracts the positive charge once enough positive charge is built up beneath the cloud the opposites attract forming a eletrical charge... thats lightning.
What About Thunder?
Thunder is caused when lightning strikes from a cloud to the ground and creates a hole in the air as it does this the air then closes back in and makes a sound we know as thunder. As light travels faster that sound we see lighning before we hear thunder.