We present the results of experimental studies of the strain effects on the excitonic transitions in GaN epitaxial layers on sapphire and SiC substrates. Photoluminescence and reflectance spectroscopies were performed to measure the energy positions of exciton transitions and X-ray diffraction measurements were conducted to examine the lattice parameters of GaN epitaxial layers grown on different substrates. Residual strain induced by the mismatch of lattice constants and thermal-expansion between GaN epitaxial layers and substrates was found to have a strong influence in determining the energies of excitonic transitions. The overall effects of the strain generated in GaN is compressive for GaN grown on sapphire and tensile for GaN on SiC substrate. The uniaxial and hydrostatic deformation potentials of wurtzite GaN were derived from the experimental results. Our results yield the uniaxial deformation potentials b 1≈−5.3 eV and b 2≈2.7 eV, as well as the hydrostatic components a 1≈−6.5 eV and a 2≈−11.8 eV.