Generally, there is not a strict dress code for tennis matches, though it often depends on the tournament or location. For the most part, players are simply required to wear a shirt, some kind of pant, short, or skirt, and tennis shoes. Wearing light clothing or clothing that keeps players cool while playing is also important. You do not want to get overheated or have sweat dripping onto your hands during a match!
Professional players will wear uniforms created by their apparel sponsors. Serena Williams is sponsored by Nike, so she will only wear specialized tennis uniforms made by Nike while competing. Famously, Williams is experimental with her clothing, as she tends to wear colorful and flamboyant clothing. Though it was not against the rules, tennis purists were angry with Williams at the US Open when she threw out the traditional shirt and skirt and instead wore a full bodysuit during a match.
The Wimbledon tennis tournament, taking place in England, is the only Grand Slam tennis tournament with a stricter dress code than "tennis attire." At Wimbledon, one strict rule prevails over others: players must wear white. Every piece of a player's uniform must be white; their shirt, their bottoms, their socks, even accessories like headbands must be white. Shoes not only have to be white, but cannot have large logos. Even warm-up gear and underwear has to be white while playing on the famous British grass courts.