Because of ultraviolet and infrared radiation from the Sun that's invisible to your eye, but can do a lot of damage. Your pupils also expand because it's generally dark but the intensity of radiation from the parts of the Sun that are still visible is very high.