how lightning occurs between two clouds during a storm?
Lightning is an electrical discharge produced to balance the differences between positive and negative charges within a cloud, between two clouds, or between the cloud and the ground.
You've heard the expression, "opposites attract." Well, this is exactly what happens with cloud-to-ground lightning.
A negative charge at the base of the cloud is attracted to a positive charge at the earth's surface. This charge is densest on isolated or protruding objects, like trees and tall buildings. When the difference between these charges becomes sufficiently strong, the normal insulating qualities of the air break down and a lightning bolt strikes.
What occurs as an instantaneous flash to the human observer actually is a complex progression of events. First, a usually invisible discharge of electrons races down from the cloud. This downward moving bolt of negatively charged electricity (called a stepped leader) incites a discharge of positively charged electricity from the ground.