I can't help but think of some comparisons between the Forbidden Forest in Harry Potter and the forest in Hawthorne's "Young Goodman Brown." In both, the forest represents an uncivilized and wild primordial place where morality is, at best, ambiguous, and at worst evil - often sinister things skulk about in the darkness. The Forbidden Forest and the Chamber of Secrets parallel each other in several ways: both are forbidden, populated with monster(s), and holds secrets, as well, if you will recall, encounters between Harry and Voldemort - Voldermort drinking the blood of a unicorn in the Forest and as Tom Riddle in the Chamber.
Otherwise, another setting mentioned in the eNotes for the novel (see link below) I think deserve mention: the "Corridors serve as passages not only to classrooms but also as transitions in story lines." The corridors and moving stair cases are instrumental in helping, if not at times guiding, the young wizards in their journeys.