We can't emphasize enough how important the Moon is in A Midsummer Night's Dream – its image shows up all over the place. We're guessing that's why three of the planet Uranus's moons are named for characters in this play – Titania (the largest), Oberon, and Puck.
When we first hear about it in the play, the moon is used to mark the passage of time. In Theseus's opening speech, he complains that time is passing too slowly and he blames the moon because he has to wait four whole days for his wedding night:
Now, fair Hippolyta, our nuptial hour
Draws on apace; four happy days bring in
Another moon: but, O, methinks, how slow
This old moon wanes! she lingers my desires. (1.1.1)
In other words, impatient Theseus really wants to sleep with his bride-to-be and so he accuses the moon of "wan[ing]" too slowly. It's fitting that Theseus blames the moon for his loveless nights – in Elizabethan popular culture and classical mythology, the moon is often called Diana (a.k.a. Artemis), the ancient virgin goddess, which means the moon is associated with chastity.
There are tons of references to this moon/virgin goddess connection in the play. When Theseus warns Hermia about becoming a nun, he warns her that it's no fun "To live a barren sister all your life / Chanting faint hymns to the cold fruitless moon" (1.1.17).
Remember how Oberon describes the time that Cupid's arrow accidentally hit the pansy and turned it into a magic, love-juice producing flower (2.1.8)? Well, Cupid's arrow was originally aimed at a "fair vestal throned by the west" (a.k.a. Shakespeare's very own virgin Queen Elizabeth I). Oberon tells us that Cupid's "fiery shaft" got lost in "the chaste beams of the wat'ry moon" and missed its original target. (We hope Queen Elizabeth found Shakespeare's little joke as amusing as we did.)
Even though the moon is often associated with virginity, it's also linked to sexual desire. Egeus tells us that Lysander has often serenaded Hermia "by moonlight" (1.1.2) and Shakespeare reminds us over and over again that, when the lovers chase each other around in the woods, the action occurs "in the moonlight."
There's also a sense that that the moon is partially responsible for the lovers' erratic behavior. Because the moon has different phases and it "waxes and wanes," Elizabethans thought of it as fickle and inconstant. (Remember from Romeo and Juliet: "Swear not by the moon, the inconstant moon"?) The moon's fickleness reflects the lovers' tendency to fall in and out of love like a bunch of madmen. At one point, Theseus declares that that "[t]he lunatic, the lover and the poet / Are of imagination all compact" (5.1.1). As we know, the term "lunatic" comes from the word "lunar," which means "of the moon."
Last, but not least, Shakespeare manages to turn the moon into a joke about the use of theater props. During rehearsals for Pyramus and Thisbe, Peter Quince worries about whether or not the moon will shine during the night of the performance, because Pyramus and Thisbe are supposed to "meet by moonlight" (3.1.4). The Mechanicals resolve the issue by making the Man on the Moon a character (performed by Starveling) in the play. During the Mechanicals' bumbling performance of the play-within-the-play, Starveling holds up a lantern and declares, "This lantern doth the horned moon [re]present" (5.1.1), which is both ridiculous and amusing.