Ultraviolet (UV) light emitted from the sun has enough energy to break chemical bonds in DNA and RNA.
Some frequencies of UV light can cause damage in the DNA in skin cells that can lead to replication and expression errors, which lead to cancer (melanoma).
Similarly, UV can break up and inactivate the genomic payload of a virus:
Sunlight or, more specifically, solar UV radiation (UV) acts as the principal natural virucide in the environment. UV radiation kills viruses by chemically modifying their genetic material, DNA and RNA. The most effective wavelength for inactivation, 260 nm (55), falls in the UVC range, so-named to differentiate it from near-UV found in ground-level sunlight, i.e., the UVB and UVA portions of the spectrum, 290 to 320 nm and 320 to 380 nm, respectively (51). Nucleic acids are damaged also by UVB and UVA but with lower efficiency than by UVC radiation (64).
Surfaces exposed to sunlight would see partial to complete inactivation of virus particles over time.
There is a paper here that discusses using a safer frequency of UVC radiation as a biocide:
The biophysical reason is that, due to its strong absorbance in biological materials, far-UVC light does not have sufficient range to penetrate through even the outer layer (stratum corneum) on the surface of human skin, nor the outer tear layer on the outer surface of the eye, neither of which contain living cells; however, because bacteria and viruses are typically of micron or smaller dimensions, far-UVC light can still efficiently traverse and inactivate them13,14,15.