The longer wavelengths of UV (Ultraviolet-A, or UV-A), near to visible light wavelengths, do not have enough energy per photon to cause mutagenic changes to genetic material in skin tissue. They also do not have enough energy to photodissociate most of the gases in the atmosphere, so they are able to penetrate all the way to the ground without much absorption by the atmosphere.

This is not to say that UV-A is harmless. Too much exposure will cause damage to skin tissue, just not as much nor as quickly as exposure to the shorter wavelengths.

The shorter wavelengths of UV (UV-B and UV-C) can break up various gas molecules because the shorter the wavelength, the greater the amount of energy per photon and the more easily they cause molecules that absorb them to break apart.

Ultraviolet-C is the shortest of the UVs, and they photodissociate molecular oxygen O2 into two oxygen atoms (O). Since O2 is relatively abundant in the atmosphere, there is plenty of molecular oxygen to completely absorb UV-C before it can reach the ground. This is fortunate for us, because UV-C would kill us all in a short time if it reached the ground. There would have to be a catastrophic reduction in atmospheric O2 concentration for UV-C to reach the ground---in the troposphere, UV-C radiation from a lamp only travels a few centimeters from the lamp before it is completely absorbed.

Ultraviolet-B is not as powerful as C, but it will still cause significant damage to skin. UV-B cannot photodissociate O2, but it can do it to O3. The stratospheric ozone layer absorbs most of the UV-B before it can reach the ground. We've adapted to the small amount of UV-B that manages to reach the ground, but excessive exposure will still affect us.