UVB rays damage the outer layer of the skin, whereas UVA rays can reach deeper dermal layers.