<p>In the vast majority of studies on semiconductor particles one uses ligands, respectively capping agents, which bind to the external surfaces of the particles and cover it with an electrically insulating shell. Since transport of charge carrier and/ or energy across interfaces is desirable for a large number of applications, the use of pi-conjugated ligands becomes more and more interesting. Among those, compounds which show stimuli-responsive properties, particularly molecular switches are fascinating, as one hopes to be able to adjust the properties of the interfaces by demand. However, how the properties of such special ligands get influenced by the presence of a semiconductor and vice-versa is under debate. Here, ammonium-modified azobenzene compounds were selected as prototypes for molecular switches and organic-inorganic hybrid perovskites on the semiconductor side. The class of ammonium-lead-halide phases as prototypes is special, because in addition to surface functionalization of 3D crystals, organic compounds can be truly incorporated into the crystal as 2D phases yielding, for example, layered Ruddelsden-Popper phases. We present photoswitchable azobenzene ligands with varying head group lengths for the synthesis of 2D and 3D hybrid perovskite phases. Energy transfer mechanisms are influenced by the length of the molecular spacer moiety, which determines the distance between the pi-system to the semiconductor surfaces. We find huge differences in the photoswitching behaviour between the free, surface coordinated versus ligands integrated inside perovskite layers. Photoswitching of azobenzene ligands incorporated to 2D phases is nearly quenched, while the same mechanism for coordinating ligands is greatly improved, compared to the free ligands. The improvement originates from an energy transfer from the perovskite to the azobenzene, which is strongly distance dependent. This study provides evidence for the photoswitching behaviour of azobenzene as ligand for hybrid perovskites and the dependence of the head group between a chromophore and the perovskite phase.</p>