Why can't ultraviolet light pass through glass? What factor determine whether a body behaves like a transparent object for EM waves of a particular frequency?
 A: It depends on what your "glass" is made out of. If you work in a chemistry lab, it's common to use cuvettes made of pure quartz, SiO2, which has a bandgap of 10.2 eV and will very happily pass ultraviolet light. However, most glass is only 80% SiO2 and its the impurities that lower the bandgap. 
The "bandgap" is the distance between the ground state of the electrons and the first excited state.  A bandgap of 10.2 eV means that jumping that electron from the ground state to the excited state takes 10.2 eV. 
A photon that's 10.2 eV has a wavelength of $1.21\times10^{-7} m$, which is UV light. Less energetic light (e.g. blue-to-red) just doesn't have enough energy to kick up that electron. So the photons pass through because they can't be absorbed. 
The impurities lower the band gap because they create many different local states for those ground-state electrons. Some of those electrons now have a bigger bandgap, and others have a smaller bandgap. The smaller the bandgap, the higher the chance that a photon passing through will be absorbed.
This is important in, say, water purification plants, where water is passed through quartz sleeves and exposed to UV light.
A: Glass has a band gap of about 5 eV, which corresponds to photon energies at UV frequencies. Photons with lower energy do not have enough energy to excite the valence electrons to unoccupied states.
The values depend a bit. Quartz glass has a larger gap than lime glass and borosilicate glass.
