Even though UVA radiation ranges in longer wavelengths (315–400 nm) than UVB (280–315 nm) and thus is less energetic, UVA is able to penetrate deeper into the skin and even reach the dermis. Why is there such a discrepancy?
Our skin contains quite a lot of water and I think this is answers the question: The absorption of UV light by this water goes drastically up when you shift to shorter wavelengts with a minimum absorption in the UV-A spectrum. See this figure (from here):
So water has a very low absorption around 340-350nm (UV-A) and a very high absorption at shorter wavelength (UV-B and UV-C). This also explains why we get a lot more UV-A through the atmosphere than for harder UV-Radiation.