Electrons could be energized and excited by photons and hence decrease Electrons wavelength to detect nano-materials, however photons themselves can't detect nano materials!
If you mean resolution, the thing is electrons have much smaller wavelengths.
Electromagnetic wave of particular wavelength interacts only with objects of the same/bigger size. I think that it the point. Thus, the use of electrons allows us to distinguish smaller objects.