How hot does it have to be to get a sunburn?

it doesn't have to be hot at all, it depends on the concentration/strenghth of the UV rays.