The atmosphere has an ability to hold water vapour, but this
ability depends upon temperature (and a few other things).

The warmer air is, the more moisture it can hold. Water
vapour evaporates from most surfaces in the world, but
especially from the oceans. After it evaporates, it gets
carried all over the globe by winds. As the winds travel
over colder surfaces the air cools. Since cooler air can't
hold as much moisture, if the air gets cold enough the
moisture will condense, becoming visible as the tiny
droplets that make up clouds. If the air cools some more,
some of these droplets will amalgamate and become bigger
drops. Once these drops are too heavy for vertical air
currents to support them, they fall out of the sky as rain.

It rains because the amount of moisture in the air is
greater than the air's capacity to hold that moisture.
Often clouds form in the rising air due to the movement of
winds over mountains and hills, or due to heating of the
earth's surface by the sun (causing air currents like the
`thermals' that glider pilots use). If the air keeps
rising over very high mountains such as the Southern Alps or
from very strong thermals (like the sort that produce summer
thunderstorms) the continually cooling air will be forced to
loose much of its moisture in the form of heavy rain.