Mr. Hooper wears the black veil because he has come to understand a certain truth about humanity: that we are all sinful, but we attempt to hide our sinfulness from one another by holding up a figurative veil between ourselves and everyone else. This intangible veil separates us, for as long as we live, from our fellows because we can never truly be known or know another when we attempt to hide this crucial part of what makes us human.
The first sermon Mr. Hooper preaches after he dons the veil helps to make this clearer. Its subject is "secret sin, and those sad mysteries which we hide from our nearest and dearest, and would fain conceal from our own consciousness, even forgetting that the Omniscient can detect them." In other words, he speaks of our secret sinfulness and the need we feel to hide that truth about ourselves, even from the people we are closest to. We would even prefer to forget this truth ourselves, and we can almost convince ourselves that even God is unaware of our secret sins because we are so anxious to conceal them.