Why?

The answer

Rain forms where moist air rises and cools; mountains, warm seas and the tropics make air rise, while dry sinking air makes deserts.

Warm air can hold more water vapour than cold air. When air rises, it expands and cools. Once it cools enough, the vapour condenses into cloud droplets, and when those droplets grow big enough they fall as rain or snow.

So the big question for any place is: does air there tend to rise, and is that air moist?

Mountains force air up. Wind from the ocean hits the slope, rises, cools and drops its water on the windward side. When the air sinks down the other side it warms up and has already lost its moisture, so that side is dry. This is called a rain shadow, and it's why places like the east side of the Andes in Patagonia, or the land east of the Cascades in Washington state, are so much drier.

Near the equator, strong sunshine heats the ground and the air rises almost every day, which is why rainforests are there. Around 30 degrees north and south, that air comes back down, dry, which is where many of the world's big deserts are, like the Sahara.

Go deeper

Why? How much more water can warm air hold?

About 7% more for every degree Celsius warmer. That's why air over warm tropical seas can carry so much water, and why storms there can drop so much rain.

Why? Why are coasts often wetter than the middle of continents?

Most of the water vapour in the air comes from evaporation off the ocean. By the time air travels far inland, much of it has already rained out.

Why? Is there a place that almost never gets rain?

Yes. Parts of the Atacama Desert in Chile get almost none. It sits in the rain shadow of the Andes, in a zone of sinking air, next to a cold ocean current that keeps the air above it dry.

Sources