This is likely multifactorial, but one piece may be the balance of fats in your diet.
Most American/western diets are high in seed oils -- AKA "vegetable oils", though they mostly do not come from vegetables. This is essentially any fat that is liquid at room temperature, e.g. canola oil, sunflower oil, cottonseed oil, etc. They are more properly called industrial seed oils.
These oils are mainly PUFA fats, which are fragile and easily oxidized. When we consume them, they assimilate into our own cells, where they are prone to oxidative damage. This includes skin cells, where sunlight breaks them down, causing us to sunburn easily.
It's hard to avoid seed oils completely, because they're in virtually all processed food and restaurant food. But it's easy to stop cooking with them, and switch to natural fats like coconut oil, butter, lard, or tallow, all of which are stable fats with minimal PUFA content.
It takes time for the fats in your cells to turn over, but people who cut out seed oils frequently report that they no longer sunburn easily, if at all.