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. This provides favorable conditions for forest growth. The air continues to rise higher and higher up the mountains. Rainfall lessens as much of the moisture is left behind.