Brain circuits comprise vast numbers of interconnected neurons with diverse molecular, anatomical and physiological properties. To allow targeting of individual neurons for structural and functional studies, we created light-inducible site-specific DNA recombinases based on Cre, Dre and Flp (RecVs). RecVs can induce genomic modifications by one-photon or two-photon light induction in vivo. They can produce targeted, sparse and strong labeling of individual neurons by modifying multiple loci within mouse and zebrafish genomes. In combination with other genetic strategies, they allow intersectional targeting of different neuronal classes. In the mouse cortex they enable sparse labeling and whole-brain morphological reconstructions of individual neurons. Furthermore, these enzymes allow single-cell two-photon targeted genetic modifications and can be used in combination with functional optical indicators with minimal interference. In summary, RecVs enable spatiotemporally precise optogenomic modifications that can facilitate detailed single-cell analysis of neural circuits by linking genetic identity, morphology, connectivity and function.