Point defects in hexagonal boron nitride (hBN) are promising candidates as single-photon emitters (SPEs) in nanophotonics and quantum information applications. The precise control of SPEs
requires in-depth understanding of their optoelectronic properties. However, how the surrounding
environment of host materials, including number of layers, substrates, and strain, influences SPEs
has not been fully understood. In this work, we study the dielectric screening effect due to the
number of layers and substrates, and the strain effect on the optical properties of carbon dimer and
nitrogen vacancy defects in hBN from first-principles many-body perturbation theory. We report
that the environmental screening causes lowering of the GW gap and exciton binding energy, leading
to nearly constant optical excitation energy and exciton radiative lifetime. We explain the results
with an analytical model starting from the BSE Hamiltonian with Wannier basis. We also show that
optical properties of quantum defects are largely tunable by strain with highly anisotropic response,
in good agreement with experimental measurements. Our work clarifies the effect of environmental
screening and strain on optoelectronic properties of quantum defects in two-dimensional insulators,
facilitating future applications of SPEs and spin qubits in low-dimensional systems.