How does Dickens use setting to convey the mood right at the opening of Great Expectations?
Interestingly, the opening scene of Great Expectations is similar to that of Nathaniel Hawthorne's The Scarlet Letter: the motif of a prison looms over the greyness of the garb of the personages who appear in both these opening scenes. Thus, what is relative to these separate narratives is the concept of both the Victorian and the Puritan societies as being restrictive, even punitive.
Both Dickens and Hawthorne perceived the societies about which they write as repressive. In the religiously restrictive Puritan society of Hawthorne's novel, one can not sin. If one does sin, one is severely punished as is Hester Prynne, and is ostracized as was Arthur Dimmesdale. If one conceals sin, one suffers from severe guilt behind one's veil of hypocrisy. In Great Expectations the motif of a restrictive society wherein one is condemned to the class in which he/she is born is pivotal to the plot. For instance, Magwitch was punished more severely than Compeyson because he came from an impoverished state whereas Compeyson was born in the upper class. Mr. Jaggers rescues Estella from the life of the streets to which she would be destined since there is no upward mobility socially in Victorian society.
The setting right at the beginning of the story is a graveyard in the marshlands. The church yard itself is described as bleak and overgrown with nettles. The land beyond it, according to Dickens, is a "dark flat wilderness." In other words, the mood is very gloomy and oppressive and the setting really helps to make it feel that way.
I think Dickens starts with this mood because this is what Pip's life is like at this point. He has no living family that seems to love him much. His only sister is really harsh. So it's appropriate that the mood and setting should be gloomy.
The setting also included this EMPTY church building that was falling apart and dilapidated. Meaning, there might not be safety anywhere, even in faith. The fact that he meets a convict as the first character who is coming up from out of the water develops a scary and fearful tone... The names are of family members on the tombstone developing the tone or mood of loss.
The criss-cross patchwork of dikes and ditches offered plenty of opportunity for Pip's return to the home to be a dangerous one. This builds the perception that there may be many obstacles to come.