Light meets matter
Light is an electromagnetic wave. When it reaches a material, its electric field interacts with charged particles, especially electrons. Depending on the light’s frequency and the material’s electronic structure, light may be absorbed, reflected, transmitted or scattered.
Why visible light passes through ordinary glass
In common window glass, the electronic energy transitions that absorb strongly are generally at energies higher than those of visible photons. Visible light therefore has relatively few available absorption pathways in the bulk glass, so much of it can pass through.
This is often described by saying glass has a wide electronic band gap. The picture is useful, though real glass is disordered and its absorption edge is more complicated than the neat band structure of a perfect crystal.
Transparent does not mean “no interaction”
Glass does reflect a little light at each surface; that is why you can sometimes see reflections in a window. Imperfections, bubbles, crystals or roughness can scatter light and make glass look cloudy. Iron and other impurities can also add colour by absorbing selected wavelengths.
And glass is not transparent to every kind of light. Ordinary soda-lime glass blocks most ultraviolet-B and ultraviolet-C radiation, and it absorbs much of the infrared beyond its transmission range. Different glasses have different windows of transparency.
The useful idea: transparency is not a material’s failure to interact with light. It is the result of which interactions are energetically possible, and how much light is reflected or scattered on the way through.
Further reading
Encyclopaedia Britannica: Glass (overview of glass structure and properties).