A visor is a type of hat with no top; it is simply a strap with a brim at the end of it. A visor is made for sports or activities that require lots of movement, like tennis. There are many reasons why tennis players choose to wear visors, with very few reasons not to wear them. One of the main reasons tennis players wear visors is because they do a great job of blocking players' eyes from the sun, keeping their vision clear if any balls are hit higher into the air. Visors also have much better ventilation than regular caps, keeping players cooler during matches. Visors are also very light weight, so it does not slow the players down in any way and allows them to move the way they want to.
There is no rule saying that tennis players must wear visors. Tennis players can choose to wear a visor, a cap, or no hat at all. The fact that they are lightweight and prevent sweat from dripping down players' faces are also two main reasons why they are so popular in tennis and other sports like beach volleyball and golf.