They locate sites that have the largest number of photometrically usable nights per year, and with the least turbulent atmosphere. These are usually on mountain tops for optical observatories. In the infrared, you look for places that have the highest transparency in the few atmospheric windows in the infrared. These are usually the best optical sites as well since they have the highest number of days with low atmospheric water vapor and atmospheric dust. At radio wavelengths, you get as far away from man made interference as you can, and the atmospheric conditions are usually not relevant. A 'quiet' desert valley works as good as a mountain top at long wavelengths. In the microwave band where we hunt for interstellar molecules, we need low water vapor conditions, so 'millimeter-wave' observatories are often on mountain tops or desert valleys. Astronomers make extensive studies of these sites with multi-year on-site measurements of atmospheric conditions before committing to a construction project.