The optoelectronic, structural, and elastic properties of K2ScCuCl6 and K2YCuCl6 double perovskite compounds were thoroughly investigated in this study using density functional theory. It is observed that both compounds exhibit exceptional structural and mechanical stability. The structural stability is assessed using Goldsmith's tolerance factor (tG), with values approaching unity indicating a reliable cubic perovskite structure. Phonon stability was ensured by the absence of negative energy formations and only real frequencies in the phonon calculations. Applying the finite displacement method also provided further evidence of the compounds' thermodynamic stability. The electronic properties analysis revealed that K2ScCuCl6 and K2YCuCl6 are narrow band gap semiconductors, with band gap values of 1.8 and 2.5 eV, respectively. This was confirmed by analyzing the density of states. Furthermore, the optical properties exhibited transparency at lower photon energies and significant absorption at higher energies. These exciting findings suggest that K2ScCuCl6 and K2YCuCl6 have promising applications in high-frequency UV devices.