Depends. There are many built in defenses against looking directly at sun, so you might be having an exaggeration of normal defense. If this happens every time and is not part of extraordinary sun gazing, you might consider having a visit with your ophthalmologist to see if there is any problem starting with your eyes.
Yes. Yes. You are experiencing ciliary spasm. The normal ocular response to light is pupillary constriction, in order to limit the amount and intensity of light entering the eye, so as to protect the internal structures of the eye from the toxic effects of ultraviolet wavelengths which damage cells and dna. In normal ambient room light, the pupillary constriction is a gentle reaction. If you suddenly go out into broad daylight, you may feel that sensation of glare and immediately squint your eyes in order that your eyelids may help limit light entry. If you look directly at a bright light source such as the sun, your pupils will quickly and suddenly constrict, less gently than in room light. The force of this constriction strains the internal ocular muscles, the ciliary body which are responsible for constricting the pupil. This sudden effort causes spasm and strain which may also cause photophobia and headache. This is all a normal part of your body’s involuntary attempts to protect you.