The light from a celestial object is bounced and distorted as it penetrates the Earth’s turbulent atmosphere, and this image degradation continues all the way into the telescope. Currents of air within the telescope tube caused by parts of the tube or optics being at different temperatures can severely degrade a telescope image, particularly in a large telescope.
Nowhere is this more apparent than in a professional solar telescope. Sunlight entering the telescope heats up the inside of the telescope and optical components, resulting in turbulent air currents that make the images less sharp than they could be.
To solve this problem, some solar telescopes contain a vacuum so there is no air to heat and therefore no image distortion within the telescope. This requires, however, a rather thick piece of glass (of high optical quality, of course) at the front of the telescope in order to maintain the vacuum within the tube. A good example of this kind of telescope is the Swedish 1-m Solar Telescope (SST) located on the island of La Palma in the Canary Islands.
A much thinner front lens can be used if the telescope tube is filled with helium rather than evacuated, and though the results are much better than an air-filled telescope tube, they are not quite as good as with a vacuum telescope.
I am not aware of any vacuum telescopes being used for nighttime observations.