Thanks for posting your query.
You have got a sunburn on your thigh, however Sun sensitivity due to allergy should be ruled out.
ake frequent cool showers or baths.Apply soothing lotions that contain aloe vera
to sunburned areas. Topical steroids
may also help with sunburn pain and swelling. If you feel mild fever and a headache then take plenty of water to manage dehydration
.Use sunblocks while going out.
You should also visit dermatologist
to rule out if you have sun sensitivity.
Hope it helps.