The Official Rules of Baseball do not require a player to wear a hat. (Except when hitting or running the bases, where a helmet is required). Uniforms are addressed under Rule 3.03.
However, many players choose to wear a baseball cap for aesthetic purposes and as a means of personal expression. There is no rule that prohibits a player from wearing a hat, but there is also no rule that requires them to do so.
In addition to looking cool, hats help players identify themselves on defense and in the batter's box. A catcher can tell which pitcher is going to throw him a particular pitch by the direction his head is turned when the pitcher releases the ball. A hitter will try different parts of the plate to see what kind of pitch he gets after studying the pitchers' motions.
There are two types of baseball caps: batting helmets and stocking caps. A batting helmet must conform to the requirements of Article II of the Major League Baseball Constitution and By-Laws. It must be white with a maximum height of 10 inches and a width between ears of at least 6 inches. It may not have any other logos printed on it.
A stocking cap is completely plain with the exception of its stitched team logo. They are worn by all players on offense during warm weather games.
In baseball, some catchers wear their hats backwards to allow a face mask, while umpires wear their caps beneath their masks. MLB pitchers have been allowed to wear a special reinforced headgear to protect their heads from line drives since the 2014 season. The gear is similar but not identical to that worn by catchers and includes a chin strap.
There are two reasons why baseball pitchers wear their caps backwards: 1 to avoid being blinded by their own blood; 2 so they can see more pitches per game. When a pitcher wears his cap forward, he is unable to see behind him. This can be problematic if there is someone else on the field who might need attention. As for seeing more pitches per game, this allows pitchers to work longer into games, which should in turn help them be more effective over a period of time.
Here is a list of current major league pitchers with their protective gear:
Jake Arrieta - Baltimore Orioles
Jacob deGrom - New York Mets
Jose Fernandez - Miami Marlins
Justin Grimm - San Diego Padres
Danny Hallinan - Boston Red Sox
Zach Hauselman - St. Louis Cardinals
While there are no particular restrictions regarding caps and hats in the MLB OBR, rule 3.03 (a) mandates all players to wear the same type of uniforms. This also contains the same kind of cap. 3.03 (a) All players on a team must wear uniforms that are similar in color, trim, and style. A player who does not wear an official uniform is said to be "in violation of this Rule."
In addition to this legal requirement, wearing a hat or cap during game play is a common practice among ballplayers. The purpose for doing so is two-fold: first, it shows respect for other players, coaches, and managers by indicating that you are paying attention and giving credit where credit is due; second, it can help block out distractions from around the field.
A baseball cap should be worn at a jaunty angle with the front center of the cap facing forward. Wearing it too low may be considered disrespectful, while one who wears it too high may be able to escape injury warnings but will likely look foolish if he fails to notice a runner heading towards him. No part of the uniform should be visible below the belt line; if it is, then it needs to be altered. A coach or manager should be notified if a player is unable to wear his uniform properly; otherwise, they might question his judgment behind the plate.