Although the rash usually goes away within hours, you may have a reaction off and on for years. Antihistamines can treat some cases, but see your doctor for advice.
To treat or prevent solar urticaria, you may also need:
Steroids that go on your skin
Sunscreen that says "broad-spectrum" on the label
Phototherapy with psoralen UV light (PUVA) to desensitize skin to UV light