The correct scientific term for when your skin breaks out in the sun is polymorphic light eruption, although this terms is usually reserved for severe cases. Currently, it is not known how sunlight causes skin to break out, or why it happens to some people and not others, it is likely to be related to an immune system reaction within your skin.
The first thing to emphasize is that if you suffer from a bout of polymorphic light eruption, it is almost certainly harmless and is nothing whatever to do with skin cancer. The rash usually starts when you first get sun on your skin after a long period without much sunshine. This often happens in spring, or if you go on a sunny holiday during the winter and mostly affects people aged 20-40 years. It is more common in women and in people with fair skin type. Sunlight contains various types of rays and the ones which make your skin break out are ultraviolet light and visible light, both of which pass through glass.
What Should I Do If The Sun Makes My Skin Break Out?
The rash should clear of its own accord within a week, though you may wish to avoid strong sunlight during this time. If it doesn't clear up, a hydrocortisone cream can ease itching and soreness. See your pharmacist or physician if the rash does not clear up after you have used the cream for the recommended time. Your skin should soon adapt to the sunnier conditions and should not break out again. This film from the Mayo Clinic gives you an overview on the condition: