Glass, quartz, sapphire, acrylic do not absorb much of the light because there are no free electrons in these 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. Or passing the spectrum invisile to the human eye, depending on the application.
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, thin amorphous Soda-Lime or Borosilicate glass window transmits about 90 percent of light energy. Sapphire transmits less energy, while specialty quartz such as Suprasil transmits more than 90 percent. See the sight glass light transmission curve here as a reference: About Sight Glasses.
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. Metal in sight glass is a type of stainless steel chosen for required strength, and also compatibility with corrosion requirements. Alternatively to stainless, the housing can be a metal alloy where the difference in thermal expansion between the window and the housing is taken into consideration, typically for larger size sight glasses.