Mountains force wind to rise as it crosses over them. This cools the air, causing moisture to condense in clouds and rain. This produces a wet climate on the upwind side of the mountains and an arid "rain shadow" on the downwind side.
Oceans provide moisture that fuels rainstorms. They also buffer the temperature of coastal regions, regardless of latitude.