Also, the sun heats up a water resource and it evaporates above to the cooler air (yes the air above is still cooler because of how separated the molecules are) and cools down to turn into clouds. It becomes very condense and it rains. It is all one big cycle caused by the unequal heating of earth's surface.