The two-dimensional material hexagonal boron nitride (hBN) hosts single-photon emitters active at room temperature. However, the microscopic origin of these emitters, as well as the mechanism through which they are excited, remain elusive. We address these issues by combining ab initio calculations with low-temperature photoluminescence excitation spectroscopy. By studying 26 defect transitions, we find excellent qualitative agreement of experiments with the emission and absorption line shapes of the carbon trimers C2CN and C2CB, while enabling us to exclude 24 defect transitions for one luminescent centre. Furthermore, we show an enhanced zero-phonon line intensity at twophonon detuning. This unambiguously demonstrates that luminescent centers in hBN, and by inference single-photon emitters, are excited through a phonon-assisted mechanism. To the best of our knowledge, this study provides the most comprehensive insight into the excitation mechanism and the microscopic origin of luminescent centers in hBN.