Due to their lack of lead, stability, and outstanding performance, double perovskites have emerged as a prominent subject of study in solar cell research. Thus, we present an analysis of the structural, elastic, electronic, and optical characteristics of Cs2YXCl6 (X = In, Tl) with regard to their applications in solar cells and thermoelectric generators. The structural stability has been validated by observing the thermodynamic stability, as evidenced by the negative formation energy and the fitting of the Birch-Murnaghan equation of state. The confirmation of structural stability in our materials is further supported by the absence of imaginary frequencies in the phonon dispersion calculations. The mechanical stability of both compounds is established by the relationship between their elastic constants, specifically C11 - C12 > 0, C11 > 0, C11 + 2 C12 > 0, and B > 0. However, it should be noted that these materials are characterized as mechanically anisotropic and ductile. By employing the highly promising Tb-MBj potential, the band gaps of Cs2YInCl6 and Cs2YTlCl6 have been calculated to be 4 eV and 0.9 eV, respectively. Cs2YInCl6 is categorized as an insulator, whereas Cs2YTlCl6 is considered a semiconductor. This distinction arises from the higher atomic mass of Tl in comparison to In, which results in elevated energy levels within the conduction band. A comprehensive investigation of the optical properties of both compounds was conducted within the energy range of 0 eV to 40 eV. It was found that these compounds exhibit significant absorption and optical conductivity in the higher energy range. Conversely, they demonstrate transparency to incident photons in the lower energy range. Based on our analysis of the optical properties, we have determined that these compounds are well-suited for applications in high-frequency UV devices. To the best of our knowledge, this study represents the first comprehensive theoretical analysis of the structural, elastic, electronic, and optical properties of Cs2YXCl6 (X = In and Tl), which have not yet been experimentally confirmed. In Summary, Cs2YXCl6 (X = In, Tl) exhibits significant promise for both solar cell and thermoelectric applications, showcasing its potential to contribute to the advancement of renewable energy and efficient energy conversion technologies.