Glass, quartz, sapphire, acrylic do not absorb much of the light because there are no free electrons in these typically transparent materials. Thus, no interference between electrons of the material and the photons of the passing light. Light transmission is very specific property of sight glasses. This is the whole purpose of a sight window, to allow visible light through.
You see, a photon has specific energy directly related to its wavelength. The spectrum of visible light wavelength is within the energy range, also known as band gap in physics, which does not excite the electrons of the glass. This allows for the photons to pass through the glass without much loss of light intensity. For ultraviolet or infrared light, however, photons have a different wavelength where they start to interfere with the glass material. The glass responds by absorbing that energy. The glass becomes hotter. This is the same response you would expect from a wall for visible light, where all that energy is absorbed into heat, which is molecular oscillation of that material.
For example, amorphous Soda-Lime or Borosilicate glass transmits about 90 percent of light energy. Sapphire transmits less, specialty quartz more. See the sight glass light transmission curve here as a reference: About Sight Glass
In a sight glass, the materials for the glass and the metal are chosen based on corrosion requirements, operating temperature, pressure, and the desired wavelength to be transmitted through the glass. Typical glass materials used in sight glasses are sodalime for low cost applications, borosilicate for higher temperatures, or crystalline materials for wide transmission of wavelengths and superior mechanical properties. Typical metal in sight glass is a type of stainless steel chosen for required strength, and also compatibility with corrosion requirements. Alternatively the housing can be a metal alloy where glass to metal thermal expansion difference is taken into consideration, typically for larger size sight windows.