The short answer is because they both consist of short wavelengths. Solar and human-made energy with short wavelengths is far more damaging to human tissue than energy with long wavelengths.
Blue light is part of the visible spectrum and has the shortest wavelength of the entire spectrum. Ultraviolet (UV) light is even shorter in wavelength than blue light but is not visible. The key point here is that the energy of the radiation is inversely proportional to the wavelength. This means that radiation with short wavelengths has much more energy than radiation with long wavelengths and it is this energy that causes tissue damage.
Some forms of UV do not damage cells directly but can generate highly reactive chemicals, which in turn can damage cells. UV radiation at even shorter wavelengths causes damage at the molecular level to the fundamental building block of life: deoxyribonucleic acid (DNA). It absorbs UV and this changes the shape of the molecule via disruption to hydrogen bonds, the formation of protein-DNA aggregates and strand breaks. Distorted proteins are created and cells die.
The molecular effects of blue light and UV can be carcinogenic (cancer-causing) and have a whole range of effects on the eye:
- Basal cell carcinoma of the eyelids
- Squamous cell carcinomas of the conjunctiva
- Choroidal melanoma
- Age-related macular degeneration
Stay out of the sun and if you can’t then wear a decent pair of sunglasses.