text: The three things that determine the average temperatures of any location are altitude (height above sea level), latitude (distance from equator of the earth) and any mitigating factors (like being near a big body of water).\n\nThe lower the altitude, the higher the temperature because (as others have noted) there is more air directly above you and thus higher air pressure, which in turn leads to higher temperatures.\n\nBeing closer to the equator of the earth (latitude) means you are somewhat closer to the sun and because of the angle that sunlight hits the earth, sunlight has to go through less atmosphere at the equator.\n\nBeing near a large body of water (ocean or sea) tends to reduce extreme temperatures because the water temperature does not change as quickly as air temperature and thus acts a moderating force (that is why San Diego has fairly moderate temperatures, but if you go a 100 miles inland, it gets hot).  Location related to global and local air streams also makes a difference.\n\nThe Sonoran desert (Tucson) is hot because of low elevation, low latitude (for the US anyways) and no large bodies of water nearby.