As the sun warms the Earth's surface, the atmosphere warms too. Some parts of the Earth receive direct rays from the sun all year and are always warm. Other places receive indirect rays, so the climate is colder. Warm air, which weighs less than cold air, rises. Then cool air moves in and replaces the rising warm air. This movement of air is what makes the wind blow.
Wind is a form of solar energy. Winds are caused by the uneven heating of the atmosphere by the sun, the irregularities of the earth's surface, and rotation of the earth. Wind flow patterns are modified by the earth's terrain, bodies of water, and vegetative cover. This wind flow, or motion energy, when "harvested" by modern wind turbines, can be used to generate electricity.