In this study the relations among nonbridging oxygen (NBO), optical properties, optical basicity, and color center formation in CaO–MgO aluminosilicate glasses were studied. Samples containing (in ) 35.9–57.5 of CaO, 16–27.7 of , 7.9–41.6 of , and 6.5–6.9 of MgO were measured by optical absorption and excitation, luminescence, and Raman spectroscopy. The results showed that when the content was increased, the absorption edge shifted toward lower wavelengths and the bonds between ions and cations became more covalent. These observations were confirmed by Raman results that showed a decrease in the number of NBO per silicon tetrahedron as a function of content. The results indicate that the effects of higher NBO concentration are the narrowing of the band gap energy and the delocalization of electrons, which facilitates the electrons to be trapped by anion vacancies and, consequently, forming color centers. The relationship between color center formation and content was confirmed by optical spectroscopic measurements under UV radiation.