Skin layers and melanin. Sunburns are caused by exposure to too much ultraviolet (UV) light. UV radiation is a wavelength of sunlight in a range too short for the human eye to see. Ultraviolet A (UVA) and ultraviolet B (UVB) are the two types of solar radiation most responsible for sunburn.Sunlamps and tanning beds also produce UV light and can cause sunburn. Melanin is the dark pigment in the outer layer of skin (epidermis) that gives your skin its normal color.When you're exposed to UV light, your body protects itself by accelerating the production of melanin.ltraviolet A (UVA) and ultraviolet B (UVB) are the two types of solar radiation most responsible for sunburn. Sunlamps and tanning beds also produce UV light and can cause sunburn. Melanin is the dark pigment in the outer layer of skin (epidermis) that gives your skin its normal color.