The topic of the first sermon that Mr. Hooper gives in this story is used by Nathaniel Hawthorne as a strong indicator of the symbolic significance for the black veil that he has donned. Note what we are told about this sermon and the description we are given about it:
The subject had reference to secret sin, and those sad mysteries which we hide from our nearest and darest, and would fain conceal from our own consciousness, even forgetting that the Omniscient can detect them.
Quite clearly, this is meant to be a very strong indication that the black veil that Mr. Hooper now wears is symbolic of his own secret sin, whatever that sin may be, and the way that it creates a barrier between him and others. This symbolic meaning is made explicit at the end of the story, when Mr. Hooper, on his deathbead, claims to see a veil covering every face when he looks at those around him. Secret sin is something that divides us from each other. The first sermon indicates that only Mr. Hooper is brave enough to face up to this fact, and the veil he dons is his symbol of this reality.