A number of medical conditions can cause an allergic reaction to ultraviolet light from the sun.