The statistic is false, though there's something meaningful behind it. From Godar et al, 2003:
Since 1986, people have been informed that they get about 80% of their lifetime ultraviolet (UV) dose by the age of 18. This belief originated from the mathematical conclusion that diligent use of sunscreens (sun protection factor 15 or higher) during the first 18 years of life would reduce the lifetime incidence of nonmelanoma skin cancers by 78%. These data were misconstrued to mean that individuals also got about 80% of their lifetime dose of UV by the age of 18 (linear relationship). However, these calculations were based on the incidence of nonmelanoma skin cancers being related to the square of the UV dose. Careful analysis of UV exposure data shows that Americans actually get less than 25% of their lifetime UV dose by the age of 18.
The approximately "80% before 18" number comes from the reduction in cancer risk of wearing sunscreens during those years, rather than actually measuring "UV exposure". Cancer risks are best understood as a cumulative accumulation of cellular damage, so it does make some sense to credit earlier UV exposure as higher risk, since damage caused at an early age has a longer time to potentially accumulate further damage and result in cancer.
A better way to re-write the quoted statement to be more accurate while keeping with the intended message might be:
Most of an average person's cancer risk from UV exposure from the sun occurs before the age of 18.
Godar, D. E., Urbach, F., Gasparro, F. P., & van der Leun, J. C. (2003). UV doses of young adults¶. Photochemistry and photobiology, 77(4), 453-457.