Photons pass through the material because they do not have the energy needed to excite a glass of electrons to a higher energy level. Physicists sometimes talk about this based on the band theory that energy levels coexist in areas known as energy bands. There are areas between these bands called band gaps, where the energy level of the electrons does not exist.
Some materials have larger band gaps than others. Glass is one such material, which means that its electrons need more energy before moving from one energy band to another. Photons of visible light – light with a wavelength of 400 to 700 nanometers, depending on the colors of violet, indigo, blue, green, yellow, orange, and red – do not have the energy required for this exclusion.
As a result, photons of visible light travel through the glass instead of being absorbed or reflected, making the glass transparent.
At wavelengths smaller than visible light, photons receive the energy needed to move glass electrons from one energy band to another.
For example, ultraviolet light with a wavelength of 10 to 400 nanometers cannot pass through most glass windows, such as glass.