There are three ways that light interacts with matter: absorption, transmission, and reflection. We will focus on absorption and transmission. Recall that light (or more generally electromagnetic radiation) is just another form of energy. Absorption happens when incident light has enough energy to excite an electron from its lowest energy, i.e., ground, state to a higher energy, i.e. excited state.
However, if the incoming light does not have enough energy to excite an electron to an excited state, that light will simply pass through, i.e., transmit. Emission is also possible, but for materials like glass, you are more likely to get emission via phonons (i.e., heat) rather than photons (i.e., light). In a solid like glass, these energy states form a set of energy bands and between these energy bands there may be an energy gap where no electrons are allowed to transition. For glass, this energy gap is large. What this means is that any wavelength of visible light is not sufficient to excite electrons from the ground state, and thus transmits. However, UV light is high enough energy and you would find that glass is opaque to it.