Good question, and a complicated one too.
Sunburn is caused by UV rays. The amount of UV hitting the ground is determined by the angle of the sun, and, of course, affected by UV absorbers, such as cloud cover.
Water vapor is a UV absorber. If you have a mild day and a hot day with the same relative humidity, the water vapor content of the air (or absolute humidity) is higher on a hot day. So, with constant relative humidity, your sunburn will be worse on a cooler day with less water vapor in the air to absorb UV rays.
Of course, this doesn't take into account the use of sunscreen and perspiration. You will perspire more on a hot day, which will flush the sunscreen off of your skin faster, and make your sunburn worse. I suspect that this is a more important factor than the amount of moisture in the air.
The worst sunburn you could possibly get would be on a cold dry day at noon in the middle of summer at high altitude with snow on the ground (reflecting UV) while exerting yourself.