Given its central role in photosynthesis1,2,3,4and artificial energy-harvesting devices5,6,7, energy transfer has been widely studied using optical spectroscopy to monitor excitation dynamics and probe the molecular-level control of energy transfer between coupled molecules2,3,4. However, the spatial resolution of conventional optical spectroscopy is limited to a few hundred nanometres and thus cannot reveal the nanoscale spatial features associated with such processes. In contrast, scanning tunnelling luminescence spectroscopy8,9,10,11,12,13,14,15,16,17,18,19has revealed the energy dynamics associated with phenomena ranging from single-molecule electroluminescence11,12,14,17,19, absorption of localized plasmons19and quantum interference effects19,20,21to energy delocalization17and intervalley electron scattering15with submolecular spatial resolution in real space. Here we apply this technique to individual molecular dimers that comprise a magnesium phthalocyanine and a free-base phthalocyanine (MgPc and H2Pc) and find that locally exciting MgPc with the tunnelling current of the scanning tunnelling microscope generates a luminescence signal from a nearby H2Pc molecule as a result of resonance energy transfer from the former to the latter. A reciprocating resonance energy transfer is observed when exciting the second singlet state (S2) of H2Pc, which results in energy transfer to the first singlet state (S1) of MgPc and final funnelling to theS1 state of H2Pc. We also show that tautomerization22of H2Pc changes the energy transfer characteristics within the dimer system, which essentially makes H2Pc a single-molecule energy transfer valve device that manifests itself by blinking resonance energy transfer behaviour.