This study used the first-principles-based CASTEP software to calculate the structural, electronic, and optical properties of heterojunctions based on single-layer GaN. GaN-MX2 exhibited minimal lattice mismatches, typically less than 3.5%, thereby ensuring lattice coherence. Notably, GaN-MoSe2 had the lowest binding energy, signifying its superior stability among the variants. When compared to single-layer GaN, which has an indirect band gap, all four heterojunctions displayed a smaller direct band gap. These heterojunctions were classified as type II. GaN-MoS2 and GaN-MoSe2 possessed relatively larger interface potential differences, hinting at stronger built-in electric fields. This resulted in an enhanced electron–hole separation ability. GaN-MoSe2 exhibited the highest value for the real part of the dielectric function. This suggests a superior electronic polarization capability under an electric field, leading to high electron mobility. GaN-MoSe2 possessed the strongest optical absorption capacity. Consequently, GaN-MoSe2 was inferred to possess the strongest photocatalytic capability. The band structure and optical properties of GaN-MoSe2 under applied pressure were further calculated. The findings revealed that stress significantly influenced the band gap width and light absorption capacity of GaN-MoSe2. Specifically, under a pressure of 5 GPa, GaN-MoSe2 demonstrated a significantly narrower band gap and enhanced absorption capacity compared to its intrinsic state. These results imply that the application of stress could potentially boost its photocatalytic performance, making it a promising candidate for various applications.