Borophene is a novel two-dimensional material with abundant crystal structure and photoelectric properties. We focus on the effect of co-doping on the electronic structure and optical properties of borophene using the first-principles method. The results show that the structure of Al and Ga co-doped borophene is obviously distorted because Al and Ga atoms have formed bonds with a bond length of 2.378 Å, and the two B atoms that bond together with Al and Ga are no longer formed bonds. However, it is also a two-dimensional planar structure after co-doping. After co-doping, the band gap width of the borophene system is narrowed from 1.409 eV to 1.376 eV, and the band gap is narrowed by 0.033 eV. Mulliken population analysis shows an obvious charge transfer between Al-B and Ga-B atoms in the co-doped borophene. The calculation of optical properties shows that the static dielectric constant ε1 (0) increases from 5.08 to 7.01, and ε2 (ω) is larger than that of the undoped sample in the low-energy range. Thus, the co-doping of Al and Ga can enhance the electromagnetic energy storage capacity and the visible light absorption ability. Although the reflectance of borophene is reduced by co-doping (the peak of the reflectivity can be decreased from 71% to 61% at E = 2.94 eV), it still presents metallic reflection characteristics. The static refractive index n0 can be increased from 2.25 to 2.65 by co-doping. The extinction coefficient shows strong band edge absorption at the low-energy range with an absorption edge of 0.85 eV. The light loss is limited to a very narrow energy range of approximately 7.30 eV, which indicates that borophene co-doped with Al and Ga can also be used as a light storage material. The optical conductivity reaches its maximum at E = 1.78 eV and 2.52 eV, which correspond to the light irradiation with a wavelength of 698 nm (red light) and 492 nm (cyan light), respectively. The results show that the Al-Ga co-doped borophene is sensitive to cyan light and red light, so it can be used to make photosensitive devices. The results can hopefully fill the gap in the application of borophene in semiconductor photoelectric devices and provide a theoretical basis for its application.