When the UV light hits the skin cells, it can be absorbed and can have enough energy to break chemical bonds in the cell. Reactive molecules are formed when these bonds are broken, and they can damage other components of the cell, including DNA. The cell can detect this damage, and either cause cellular suicide, or repair the damage.
When you get sunburned, the UV radiation from the sun causes damage to the DNA in your skin cells. The cells try to repair the damage; in some cases the damage is too great and the cells end up dying (through the process I study, apoptosis), but in other cases they do manage to repair the DNA… though they can’t always do a perfect job, so the DNA gets altered – this is a mutation.
The redness, soreness and itchiness of sunburn is caused by an inflammatory response – the same sort of response you get to other kinds of damage, like cuts and insect bites. The blood vessels beneath the skin dilate (in other words they get wider), which makes the skin look red; various chemicals get released in the area, including histamine which makes it feel itchy.