Are there pills available to prevent sunburn?

But.... There are medications that can cause you to burn more easily..... Even with sunscreen...Check with your doctor or pharmacy before you go to see if you are at a higher than normal risk of burning....
No. The best way to prevent sunburn is to avoid sun exposure. Sunscreens will not prevent sunburn; they just allow people to stay in the sun longer before they start to burn. If you tend to get sunburned, avoid sun exposure between 10 am and 4 pm; wear long-sleeved shirts, long pants, and a hat with a wide brim; and use sunscreen with spf 50 if you'll be in the sun for more than 15 minutes.