No, Aloe Vera doesn't help prevent or heal sunburn.
I have to admit to being surprised by this. I was expecting to see a (small) effect.
This experiment involved 20 volunteers in a randomized double-blind trial, where they applied aloe vera cream (or placebo) either before, after or before and after exposure (twice daily for 3 weeks).
The results showed that the aloe vera cream has no
sunburn or suntan protection and no efficacy in sunburn treatment when compared to placebo. The aloe vera
cream has no bleaching effect too.
This was a review of the scientific literature that came to the same conclusion:
Topical application of A. vera is not an effective prevention for radiation-induced injuries and has no sunburn or suntan protection.
However, there is evidence that general (e.g heat-based) burns and wounds can be helped by aloe vera.
The same paper, Feily and Namazi, also states:
It can be effective for genital herpes, psoriasis, human papiloma virus, seborrhoeic dermatitis, aphthous stomatitis, xerosis, lichen planus, frostbite, burn, wound healing and inflammation.
This also concluded that aloe vera helped with burns:
the summary weighted mean difference in healing time of the aloe vera group was 8.79 days shorter than those in the control group
The idea that aloe vera helps with regular burns but not sunburn still surprises me.
This essay, sometimes straying into superlatives and past what the scientific evidence supports, discusses some of the history of the research, and makes an interesting distinction between fresh aloe vera and the gels found in cosmetics.