The formation model of hydroxyl group in silica glass is studied by first-principles calculations combined with coupling plane wave pseudo-potential method. The electronic structures and optical properties of silica glass with and without hydroxyl group are systematically calculated, including electronic densities of states, charge difference densities, Bader charge, etc. And optical transition models are analyzed. Our results show that three-fold coordinated silicon in silica glass induces two defect energy levels in forbidden gap, which are at 7.8 eV and 8.8 eV, respectively. Also, we find that H atom can interact with five-fold coordinated Si and forms hydroxyl group, and causes the three-fold coordinated silicon atom to change from sp2 hybridization to sp3 hybridization. Such a kind of hydroxyl group influences the electronic structure and optical properties of silica glass, by forming a half-occupied electronic state at Fermi level, and also by generating an optical transition, of which the excitation energy is 6.2 eV.