Hexagonal boron nitride is an indirect band gap material with a strong luminescence in the ultraviolet. This luminescence originates from bound excitons recombination assisted by different phonon modes. The coupling between excitons and phonons is so strong that the resulting light emission is as efficient as the one of direct band gap materials. In this manuscript we investigate how uniaxial strain modifies the electronic and optical properties of this material, and in particular how it affects the exciton-phonon coupling. Using a formulation of this coupling based on finite-difference displacements, recently developed by some of us, we investigate how phonon-assisted transitions change under strain. Our results open the way to the study of phonon-assisted luminescence in strained materials from first principles. Our findings are important both for experiments that directly probe h-BN under strain or for those in which it is used as substrate for other 2D material with a lattice mismatch.