Its better to prevent sun burn than treating it.
So you need to take following measures, if want to prevent it.
1] Do not be in sun for too long , still remains main thing.
2] Use sunscreen with SPF 30 at least.
3] Do not expose body parts directly to sun.
4] Use loose, cotton, but not dark colored cloths.
5] Remain well hydrated- drink plenty of water and juices.
6] Apply cold
compresses — such as a towel dampened with cool tap water — to the affected skin. Or take a cool bath or shower; in case you start feeling burns.
7]Apply a moisturizing cream, aloe vera
lotion or hydrocortisone cream
to affected skin; in case you start feeling skin irritation.
8] Keep Calamine
lotion with you in case start itching, it will sooth the skin.