I found sunfrapo in PIV, but I can't find any evidence that this term is actually used for “sunburn”. The only examples I can find seem to refer to heat stroke.
(PIV lists both definitions.)
In my practical experience I always heard sunbruliĝo.
sunbruliĝo is the sunburn on the skin. sunfrapo I would understand as the german "Sonnenstich", a kind of heat-stroke. It's a sickness, dizziness kind of thing, caused by heating of the brain skin, or something like that.
I'm pretty sure that sunbruno is actually suntan and sunbrulo is sunburn.
Bruli is intransitive. I think brulo here must refer to the sensation of burning:
Mi sunbrulas. I am sunburnt. (That is, "I am burning on account of the sun.")
Mi sunbruliĝas. I am getting sunburnt.
Mi havas sunbrulon. I have sunburn.
And it would work the same way for sunbruno.
More generally, a burn is a brulvundo ("burn wound").
Sunbruliĝo is "solar combustion", and is awkward to justify here (unless the metaphor is that your skin has "caught fire"). In any case sunvundo would probably be a better term (Mi sunvundiĝis, etc.)
JC Wells in his Esperanto Dictionary translates it as sunbruno, and, as you suggest, sunfrapo is a sunstroke.