The effect of mixed halogen composition on the structural, electronic, and optical properties of CsGeX2M (X, M = Cl, Br, I) has been studied using density functional theory, generalized gradient approximation, and modified Becke-Johnson exchange potential (TB-mBJ). The electronic properties show that all structures are direct semiconductors with wide band gaps between 1.251 eV and 1.655 eV. In addition, the band gap values of these materials are tuned by decreasing the number of chlorine or bromine atoms. PDOS analysis of CsGeX2M compounds shows that the Cs atom has negligible effects on the electronic bands of these perovskites. The major contribution to the electronic bands of these compounds close to E-f comes from the Ge orbitals and I, Br, and Cl . Optical properties show that these materials have good absorption capacity. The photon absorption coefficient along the z-axis in the visible light region is between 40 x 10(4) cm(-1) and 65 x 10(4) cm(-1), thanks to their narrow band gap. Furthermore, the real epsilon(1) and imaginary epsilon(2) parts of their dielectric functions show that CsGeBr2I, CsGeBr2Cl, CsGeCl2I, and CsGeCl2Br also possess a high ability to retain the energy they absorb.