Are you sure the professor wasn't referring to UV-erasable EPROMs, like they were used until the 90's of last millennium? You do mention EPROM, not EEPROM.
Those can easily be erased by sunlight. Our "sunbed", as we called our eraser at the time, took 20 minutes to erase an EPROM. Datasheets for both UV-erasers and EPROMs mention a typical wavelength of 253.7 nm (I'm not sure how important that 7 Å is). From the M2732A datasheet:
The erasure characteristics of the M2732A are such that erasure begins when the cells are exposed to light with wavelengths shorter than approximately 4000 Å. It should be noted that sunlight and certain types of fluorescent lamps have wavelengths
in the 3000-4000 Å range. Research shows that constant exposure to room level fluorescent
lighting could erase a typical M2732A in approximately 3 years, while it would take approximately 1 week to cause erasure when exposed to the direct sunlight. If the M2732A is to be exposed to these types of lighting conditions for extended periods of time, it is suggested that opaque labels be put over the M2732A window to prevent unintentional erasure.
254 nm is in the UV-C band, and most of the sun's UV-C is filtered in the stratosphere. That's why it will take up to a week to erase all 32 768 bits of the 2732 in direct sunlight, though the first altered bits may occur much faster than that.
Like the datasheet says you don't even need sunlight. Leaving an EPROM on your desk under a fluorescent desk lamp without protective sticker will have the first bits erased within days. To erase all bits you might need more than a year however, depending on how close the lamp is to your desk.
edit (re your comment)
Since you seem to be talking of EEPROMs, i.e. the window-less: yes, those can also be "erased" by sunlight. I'm putting erased between quotes, because I would rather say "altered". In direct sunlight (stand on a chair to be closer to the sun) some of its energy may penetrate through the package to the charge on the floating gate, giving some of it enough energy to tunnel through the isolation barrier. After some time (years) you may see that some bits altered state. But in practice it's impossible to erase a whole device this way.
edit 2
I said "tunnel through the isolation barrier", and that's how it's usually said. But as far as I understand quantum mechanics (not much) that should be "tunnel to the other side of the isolation barrier", not "through" it.
"I think I can safely say that nobody understands quantum mechanics" —
Richard Feynman