It is to prevent post-operative PRK haze.
Ah, and it is best practice--even for virgin eyes (eyes that did not have an operation).
The sun produces UV, and sunglasses protect the eyes from that. UV may induce cataracts, macular degeneration, pterygium, etc.
It is important to make sure sunglasses have 100% UV protection. A spectrometer, often found at an optometrist's office, can measure how much UV passes through a lens.
UV is not part of the colour spectrum (it is invisible light), so tinted lenses do not guarantee UV protection! To be sure, look for "100% UV Protection" or "UV 400 Protection" (blocks all light waves less than 400nm). It is also best to verify with a spectrometer.