Lightning is like static electricity, except on a much bigger scale. Both lightning and static electricity happen because of the attraction between the opposite charges. In storm clouds, tiny particles in the cloud move around picking up positive or negative energy charges, like when shoes scuff a rug. The positive charged particles stay light, and rise to the top of the cloud. The negative charged particles get heavier, and collect at the bottom of the cloud. As more particles become charged, they divide into opposing groups in the cloud. When the power of attraction between them gets too great, the particles discharge their energy at each other, completing a path for electricity to travel through the air. We call this flow of electricity lightning. It's the negative charges in the bottom of the cloud that cause lightning to strike the ground. When the negatively charged particles group together, they begin to seek out positive charges from the ground below.
This also happens if you walk across a carpet, electrons move from the rug to you. Now you have extra electrons. Touch a door knob and ZAP! The electrons move from you to the knob. You get a shock.