Lightning is created by clouds that have gathered up energy from the sun. Clouds are formed by droplets of water. The amount of water vapor in a cloud will determine the height of the cloud, and what weather system it may create. The energy is turned into electricity that is released as lightning. Thunder is the sound that comes from lightning when it is released in the form of electricity. There are various types of clouds. Cloud types that are most associated with thunder, lightening, and other bad weather are cumulonimbus clouds, mammatus clouds, and altocumulus clouds.