I have a really painful sunburn. How do I stop the pain?

Stay cool/anti-infla. Cool soaks, baths, or compresses can help. Also anti-infammatory medicines, like aspirin, ibuprofen, etc. Can help. A cooling lotion like sarna may help also.
Pain. Aloe vera (aloe barbadensis) can reduce redness, pain, itching & swelling from a burn. It has anesthetic, anti-inflammatory & antibacterial / antifungal qualities. It can speed burn healing by stimulating growth of new skin. Apply cool compresses. Non-steroidal anti-inflammatories and acetomenophen can be very helpful. Hydrate well and don't peel off any deep layers.