The term is called Photic sneeze reflex or sun sneezing. Its a uncontrollable sneeze response when looking at or walking into bright light. The condition effects 18-35% of people.
I know I sneeze when walking into or looking at bright light. If I am in the shade and walk into sun light I would sneeze within ten seconds almost each time. Looking at is not really directly looking at the sun, but looking up toward the sun for longer then 15-20 seconds would cause me to sneeze.