The development of lead-free inorganic halide perovskites has revolutionized photovoltaic and optoelectronic research in recent years. In this study, ab-initio methods have been implemented to predict the mechanical, optical, structural, and electronic properties of Rb2AgGaX6(X = Cl, Br). Through tolerance factor and third-order elastic constant analyses, we systematically probed the structural and mechanical strength characteristics of Rb2AgGaBr6 and Rb2AgGaCl6. These analyses provide both structural and mechanical stability. Additionally, thermodynamic stability tests were undertaken using formation energies. The calculated direct bandgaps by mBJ with spin-orbit-coupling are 2.53 eV and 1.28 eV for Rb2AgGaCl6 and Rb2AgGaBr6 respectively. The appropriate narrow electronic bandgaps provide visible-light absorption. Consequently, the optical properties revealed a high absorption coefficients (α(ω) ≈ 1.9 × 105 cm−1 for Rb2AgGaBr6 and 2.1 × 105 cm−1 for Rb2AgGaCl6), high conductivity and low reflectivity (R(ω) < 10 %), which make the Rb2AgGaBr6 and Rb2AgGaCl6 attractive semiconductors for optoelectronic application. The theoretical maximum light conversion efficiency was calculated under AM1.5G solar illumination based on the variable thickness. The outcome is that bromine-based perovskite provides a superior efficiency of approximately 32.20 % and chlorine-based perovskite demonstrates an efficiency of 12.0 %. By virtue of extremely favorable bandgaps, low reflectivity and impressive efficiency, the eco-friendly halide perovskites appear to be auspicious clean renewable energy materials. Our results provide the scientific community with new insights and lead to the design of future solar cell devices.