The first sentence of the novel actually serves as an example of cacophony, the literary term for a series of harsh, discordant sounds:
A throng of bearded men, in sad-colored garments, and gray, steeple-crowned hats, intermixed with women, some wearing hoods and others bareheaded, was assembled in front of a wooden edifice, the door of which was heavily timbered with oak, and studded with iron spikes.
The mixture of long vowels and short vowels as well as soft consonant sounds and hard consonant sounds makes this sentence cacophonous. It makes sense that Hawthorne would begin the novel with such a noisy (and long) series of words, given his obvious authorial tone of disdain for the Puritans, their beliefs, and their laws. The cacophony of the description underlines the negative connotations of words such as sad, gray, heavily, and spikes. Further, the description of the hats as "steeple-crowned" (like a church steeple) when associated with the negative connotation and cacophony helps readers to understand Hawthorne's dislike of the Puritan religion as well. All of this negativity helps to set the mood of the story as somewhat dark and sad.