In this work, we delve into the investigation of the structural, electronic, and optical properties of Ba2NbBiS6 and Ba2TaSbS6 chalcogenide-based double perovskites, which are structured in the cubic space group Fmˉ3mFmˉ3m form. We have performed first-principles calculations using density functional theory (DFT) to study the above properties. The electronic band structure and density of states of this compound have been investigated, and their results show that Ba2NbBiS6 and Ba2TaSbS6 exhibit a semiconducting nature with an indirect energy gap of 1.680eV and 1.529eV, respectively. Furthermore, an investigation was conducted on the optical properties of the compounds throughout the energy range spanning from 0eV to 55eV. This investigation focused on many parameters, including dielectric functions, optical reflectivity, refractive index, extinction coefficient, optical conductivity, and electron energy loss. The optical data obtained from the calculations reveals that all compounds demonstrate isotropy in optical polarization. Furthermore, it has been noted that our compounds exhibit absorption properties inside the ultraviolet (UV) region. Consequently, these materials hold promise as potential candidates for various applications, such as UV photodetectors, UV light emitters, and power electronics. This is primarily attributed to their inherent absorption limits and the presence of prominent absorption peaks in this spectral range. In brief, chemical mutation techniques have been employed to manipulate the characteristics of double-sulfide perovskites to develop durable and environmentally friendly perovskite materials suitable for solar purposes.