Prateek,
Thunderstorms are formed when warm air rises quickly from Earth into the sky. As the warm air cools, it forms rain clouds (cumulonimbus). As the warm air continues to rise and cool inside the clouds, it drops water and ice. Lightning is caused by electricity moving in between clouds or between the clouds and the ground. The electricity is formed when the ice and water particles move around rapidly inside the clouds. As the particles move they become oppositely charged and they separate. The positively charged particles go to the top of the cloud and the negatively charged particles sit along the bottom of the cloud. The negative particles along the cloud bottoms grow large and are attracted to the positive charges on the ground. When the "attraction" between the different charges becomes strong enough, electricity flows from the cloud to the ground. This flow of electricity is a lightning strike.
Hope that clears it up for you.
Just as interesting is what makes the thunder: Since the Lightning lasts only a fraction of a second, but it is filled with energy, it is very hot. (It can reach temperatures that are much hotter than the sun). The heat of the lightning is what actually causes the thunder. As the hot electrical charge passes through the air, it rapidly heats up the air. The heated air expands very quickly and makes the loud noise called thunder.
MP