The two prior answers are spot on in their assessment of the nature of the forest in Midsummer. I merely wish to offer an additional avenue for contemplation focusing on the faeries and forest as a bridge between the audience's reality and the character's.
Theseus is a city builder, a founder and hero. He is the epitome of order while Hippolyta is the chaotic bender of gender roles (Amazon) who has apparently been tamed. The playwright is an organizer of thoughts and characters just as Theseus is a founder of a society, and the forest is, as sciftw posted, "a departure from the rational, ordered." If Shakespeare wanted to shake up the entire structure of the play, he had only to send his royal couple into the depths of the woods but instead he created parallel faery royalty (which also features a king who is attempting to tame a willful wife) and left them out of the heart of chaos. He does, however, send the younger generation, which is actually causing chaos in the city by defying the order the older generation would demand, into the forest.
In the forest, unexpected partnerships and defiance of order are allowed. The faeries and magic give permission to break generations of arranged marriages and preplanned destinies. The pompous are brought low. Here then is the forest as a bridge. Cross the bridge, change your destiny.
Shakespeare's audience faced the same constraints as the lovers and yet where was their forest where all was possible? In reality, the system of society was inescapable but perhaps through the silliness and magic of this simple play the audience could take the forest home with them.
I agree with the above and would add that, as this is a play about Love, all kinds of it, (it was written to be performed at the wedding of a noble), the forest symbolizes the level of consciousness into which the love-struck are thrust. It is a world over which they experience having no control and in which the learned behaviors practiced in the 'normal' world have no effect but to make matters more confusing.
The fairies are the beings who are native to this environment or level of consciousness. They represent impulses unfettered by the laws that govern the three dimensional world. The play brilliantly expresses the connected-ness of these worlds, and uses the forest, the unknown, the wild, as the necessary backdrop in which to do this.
The forest and fairies symbolize a departure from the rational, ordered, and practical world of the city and society. The city has strict laws that must be followed or may be punished by death. Conversely the forest and fairies represent a world of wonder and imagination. They both are mysterious and dream like and provide a sense of escape from normalcy. On top of all of that, the forest and fairies are representative of the magic that is there and that can be done over the course of the play.
Much of that magic is transformative in nature. Sometimes that transformation is quite literal, such as Bottom's transformation into a half donkey. Other times it's an emotional transformation as is the case with Puck causing characters to fall in and out of love with characters like Hermia and Helena.
Shakespeare is not alone in using forests to symbolize supernatural forces. Washington Irving frequently used forests in this format -- Legend of Sleepy Hollow and Rip Van Winkle. Nathaniel Hawthorne did it, too. In fact, one of the characteristics of the Romantic literary movement was its focus on the mystical abilities of forests and nature.