Control of photon emission from single molecules and planar materials