They are used to block the flow of air or other fluids while allowing light to pass into or out of an optical system.
The material has to be transparent to a wavelength range of interest but not necessarily to visible light.
[2] A window of this sort is commonly parallel[1] and is likely to be anti-reflection coated, especially if it is designed for visible light.
[4] Optical windows used for UV/VIS spectroscopy, are usually made from glass or fused silica.
[5] In IR spectroscopy, there is a wide range of materials that transmit light into the far infrared and can be utilized for the construction of optical windows, from barium fluoride (BaF2), calcium fluoride, potassium bromide, potassium chloride, sodium chloride, germanium (Ge), zinc selenide (ZnSe) and sapphire.