Most solid substances are insulators, and in terms of the band theory of solids this implies that there is a large forbidden gap between the energies of the valence electrons and the energy at which the electrons can move freely through the material (the conduction band).
Glass is an insulating material which may be transparent to visible light for reasons closely correlated with its nature as an electrical insulator. The visible light photons do not have enough quantum energy to bridge the band gap and get the electrons up to an available energy level in the conduction band. The visible properties of glass can also give some insight into the effects of "doping" on the properties of solids. A very small percentage of impurity atoms in the glass can give it color by providing specific available energy levels which absorb certain colors of visible light. The ruby mineral (corundum) is aluminum oxide with a small amount (about 0.05%) of chromium which gives it its characteristic pink or red color by absorbing green and blue light.
While the doping of insulators can dramatically change their optical properties, it is not enough to overcome the large band gap to make them good conductors of electricity. However, the doping of semiconductors has a much more dramatic effect on their electrical conductivity and is the basis for solid state electronics.