I believe your question is why does more precipitation fall on the windward side of mountains. And yes it does have to do with temperature changes.
As any parcel of air is lifted it cools adiabatically (without addition or removal of heat). That may sound confusing but basically what that means is that as the parcel rises the atmospheric pressure (weight of the atmosphere above it) drops.
We know that pressure is directly proportional to temperature (think of a pressure cooker), so when the pressure drops the temperature drops too. If you prefer to think about this in terms of kinetic molecular energy, the air parcel expands so the molecules to not interact with each other as much. The energy of the particles does not change (heat) but the fact that the particles are more spaced out means the parcel is cooler.
The warmer a parcel of air is the more water vapor it can hold. Conversely, if a parcel of air cools it's ability to hold water vapor (relative humidity) drops and if it drops to the point that it cannot hold the vapor (100% relative humidity or saturation point) that is already in it the water vapor will condense and turn back into liquid water. This is how clouds and precipitation form.
So if you look back a the beginning of this answer you will see this all started with the air being lifted. Every time the wind blows against a mountain it will lift the air (on the windward side), consequently the windward sides of mountains receive a lot of precipitation.