So I'm going to talk more about deindividuation, which social psychologists define as the loss of sense of self that occurs when people in a group are anonymous. More generally, deindividuation can also be thought of as the loss of self-awareness the comes with anonymity.
First, what's the effect of wearing a mask? Psychologists have addressed this question. Research on the effect of wearing a mask goes back at least as far as the 1950s. Research on mask-wearing among stutterers finds that they stuttered less when they wore a mask (e.g., Pollaczak & Homefield, 1954). In another study, children who wore masks were more likely to take (e.g., steal) extra candy when the experimenter left the room, compared to children who didn't wear masks (Miller & Rowold, 1979).
Psychologists Mullen Migdal, Rozell (2003) did a study that had participants answer various questions about how aware they felt about themselves, such as "I am thinking about who I am" and "I am alert to changes in my mood." The part of their study that is relevant here is that some of the participants answered these questions while sitting in front of a mirror; other participants answered those questions while wearing a "feature-less" mask, without a mirror. The results, graphed below, reveal that participants who wore masks reported that they were less self-aware than participants who sat in front of a mirror. (The results may seem intuitively obvious, but part the role of research is to find out whether intuitions are accurate.)
So how might this relate to superheroes (and supervillains) who wear masks? In addition to the utility of the mask—it hides the "real" identity to of mask-wearer—it can have some interesting psychological effects on the wearer. We can hypothesize that wearing a mask—and being less self-aware—might confer a variety of advantages. If you're less self-aware, then you might:
• Feel less pain
• Feel less angry, sad, etc.
• Be more aware of what is going on around you (because of being less aware of what's going on inside of you). This could be a very good thing to have happen during combat. And when fighting, you'll also be flooded with adrenaline, which will narrow your attention and further heighten your awareness of what's happening around them.
The down side, though, is that by being less self-aware, you're also more likely to have your anger, frustration, and aggressive impulses get out of control while you're fighting (and so you might inadvertently kill your enemy). For superheroes worried about not crossing the line—not being more violent than they need to be to apprehend the villain—wearing a mask can make it harder to monitor that line.
Speaking of villains, wearing a mask--being anonymous—makes people more likely to break rules. (Think back to the kids wearing masks, who took more candy). This might advantage mask-wearing villains.