Symbolism, Imagery, Allegory
When Anne is in the woods, that usually means it's buddy time. And it specifically means it's time for some Grade A Diane-bonding.
Between the woods that stand between their houses and the Birch Path they take to walk to school, the woods are Anne and Diana's extended lair.
It's where they have the freedom to talk about anything they want: gossip like "Ruby Gillis thinks of nothing but beaus" (26.7) and important things to children of their time, like "In four more years we'll be able to put our hair up." (26.7) There are no adults to tell them what to think or how to speak about their schoolyard topics.
The woods is also where they can imagine whatever they want—even if they decide to imagine the creepiest possible creatures, and turn their lair into a Haunted Wood. Hey—in the time before Scary Stories To Tell In The Dark, that's what kids were forced to do when they wanted to terrify themselves.