Why is glass transparent only to visible light and not to UV and Infrared?
As has been said, glass is not necessarily transparent to UV or IR, though it blocks SOME of these wavelengths, including visible light. To increase the blocking of UV and IR, manufacturers make “low-e” glass, which involve molecular metal coatings that reflect these wavelengths while allowing most visible light to pass through.