Basically because glass is the cheapest material that light passes through readily. The basic function of a window is to allow light into a building and since cost is a major driver in building materials glass is the best choice.