You can tell that a book is going to include justice and judgment as a major theme when one of the main characters is, in fact, a judge. There's an important conflict in The House of the Seven Gables between public judgment and real justice. Hawthorne criticizes the state institutions of Massachusetts, in which men can gain lots of power and be widely respected despite their bad character. Men like Colonel Pyncheon and Judge Pyncheon are both allowed to flourish because they are energetic and they get things done. No one really seems to care that they are bullying or greedy, as long as they keep bringing in cash and donating money to the right causes. It's only through the perceptive, careful research of artists like Mr. Holgrave that we get the truth that lies behind the respectable public faces of these characters. (For more on Hawthorne's personal issues with hypocrisy and self-righteousness, check out "In a Nutshell.")
The Pyncheon family's Puritan origins demonstrate the association of ideas Hawthorne makes between Puritanism, self-righteousness, and hypocrisy.
Mr. Holgrave is in a unique position to bring about justice in The House of the Seven Gables because Hawthorne represents him as an outsider, far away from the corrupt structures of power that protect men like Colonel and Judge Pyncheon.