Here warm air in a room has come in contact with a glass of ice water. The moisture in the chilled air has condensed out, leaving drops of water on the outside of the glass. Now let's see how this affects the rainfall on a planet. As the sun rises, the land and water on a planet begins to warm up. The land warms more quickly than the water, and the air above the land warms up too.
Warm air rises.
As the warm air rises, it pulls moist air landward from above the sea. This warm, moist air also begins to rise. Water falls from cooling air. As the moist air rises, it begins to get cooler. The water begins to fall out as rain.