Metal halide perovskite materials are seamless applicants of photovoltaic and optoelectronic devices. First-principles computational approach is carried out in this work to explore the structural, electronic, and optical characteristics of Tl2PtX6 (X = Cl, Br). In structural details, the formation energy (Hf) exposes the studied materials as stable and the tolerance factor along with phonon spectrum decide the stability criterion for the certainty of structural stability of these alloys. The robust p-d hybridization between cations (Pt) and anions (Cl and Br) descent the semiconducting direct band gap from 2.37 eV (Cl) to 2.12 eV(Br), respectively in response to the decreasing size of halide atom. This shrinking gap owed to replacement of Cl to Br anions swings the absorption towards visible region. Also, the possible photoreduction of CO2 by Tl2PtX6 is observed from simulated HER plots. The present materials exhibit a significant absorption coefficient α(ω) throughout the visible and ultraviolet spectrum (2–6eV) of light, which marks the experimental realization of photocell and optical device applications.