During the formation of rainfall, water from oceans mostly, then lakes, rivers absorb heat energy form the sun. They get heated up and evaporate into the atmosphere as water vapour. This is often called invisible water vapour. This vapour mixes with the air in the atmosphere and becomes humid. This water vapour can remain in the atmosphere for days. Later, when the water vapour cools off by releases the heat Its heat to the atmosphere through a process called condensation. This is the rainfall we experience and the heat before the rain is as a result of the heated water vapour in the atmosphere cooling off to form water droplets. The coolness and calm after the rainfall diffuses the heat away.