A visor is part of the front of a helmet that can usually be raised or lowered. Visors shade your eyes from the sun.
The brim of a hat keeps the sun out of your eyes, but the visor of a helmet does an even better job. The visor actually covers your eyes, much like sunglasses. Many motorcycle helmets have a visor, and so do some police helmets and football helmets. As with sunglasses, the visor restricts your vision in some ways, so it's the kind of thing you would only want to use if the sun is blinding.