The conversion of water vapour into precipitation is an exothermic process. It is exothermic because in order for gaseous water to convert into liquid water the system has to lose heat, hence releasing heat during the process of condensation. The approximate temperature at which water can condense from a gas to a liquid is called the dew point. The dew point raises as the amount of water vapour in the air increases. Water can also condense if the saturation point of the air has been met. What this means is that there is more water vapour in the air than the air can hold, and so the water is forced to condense.
It is important to note that water vapour requires a surface on which to condense, it does not spontaneously condense into a liquid unless the water vapour has become supercooled for several hours. In the atmosphere, this surface is called a cloud condensation nuclei. These particles are composed of a variety of things such as dust or sea salt.