The Real Reason They Wear Sunglasses In The Matrix
When "The Matrix" first hit theaters in 1999, few people had seen anything quite like it. This is true not just of its story and characters, but of its entire aesthetic. Everything from the green filter that glazes over every scene set in the Matrix, to the unique, leather-clad attire of its super-hacker protagonists was completely original. Of course, once the film skyrocketed in popularity those aesthetic elements soon became commonplace. However, the image of a trench coat-sporting, sunglasses-wearing badass is still synonymous with the franchise that birthed it.
If you think that aesthetic is there purely for its coolness factor, however, you'd only be partially correct. While Neo and his ilk certainly look cool in their dynamic duds, and neither of the Wachowskis has spoken officially on the matter, the outfits themselves are still a part of the larger story. As such, they contain elements that help tell that story, associating images with the themes that lie at the heart of "The Matrix." In other words, the real reason they wear sunglasses in "The Matrix," is to hammer in certain ideas that the film wants viewers to internalize.
The sunglasses sell the idea of viewing a filtered reality
One popular interpretation of the sunglasses, which extends out to the frequent inclusion of reflective surfaces throughout the trilogy, is that they represent viewing the world through a filter. According to SparkNotes' interpretation of the theme, sunglasses are a way for both the character and the viewer to recognize when characters are and are not in the Matrix. Even when they are in the Matrix, removing sunglasses can be interpreted as a moment of clarity, insight, or other intense emotion.
For instance, one of the few sequences where Neo is not shown wearing glasses inside the Matrix comes when he first begins to realize that he is the One. His perspective has shifted, and his sunglasses come off to reflect that. Additionally, as SparkNotes points out, Neo takes off his sunglasses to kiss Persephone in "The Matrix: Reloaded" as a way to signify the intense emotion of the moment.
The concept of removing sunglasses to show emotion or character change is not exclusive to Neo, however. Agent Smith, the main antagonist of the franchise, removes them at the end of the first film when interrogating Morpheus. During his speech, he reveals a desire to escape the Matrix and live a "real" life. The removal of his glasses (and his earpiece) tells us that this artificial construct is experiencing real emotion.
The sunglasses are a form of rebellion
The fact that agents wear sunglasses is an important part of "The Matrix," not just because it completes their look, but because it is copied by the awakened humans fighting inside the Matrix. As Reddit user u/AWindintheTrees pointed out, both the humans and the agents wear sunglasses to disguise their true intentions. However, it is a practice which the humans took up, possibly as a sign of rebellion against their agent oppressors.
For the humans, wearing the glasses in this scenario recontextualizes them greatly. They are no longer a signal of the agents, but a form of subterfuge and the subtle acknowledgment that nothing they see with the Matrix is real. As we said before, it is a visual cue indicating that the wearer knows they are looking at a false reality.
Alternatively, the rebellious spirit of the sunglasses may be a call back to John Carpenter's "They Live," where a pair of special sunglasses becomes the key to revealing the hidden presence of alien overlords on Earth. In this example, wearing sunglasses not only allows the wearer to see the truth but protects them from the harmful untruth that they would see otherwise. No matter which way you see it, however, the eyewear of "The Matrix" signifies that the wearer possesses unusual knowledge, and is likely more than what meets the eye.