Probing nanoscale light-matter interactions in photonic and plasmonic nanostructures