Both of these plays are excellent examples of Shakespearean comedies, and, as such, they both possess a number of similarities in terms of the normal aspects of comedies that are associated with Shakespeare. For example, both contain lovers whose union is thwarted or prevented in some way, both contain a forest where the lovers go to try and escape the problems they face, there is gender confusion and disguised identity and by the end, the various problems are solved and the lovers are free to marry. Both of these plays in particular are interesting in their use of setting, as the Forest of Arden and the forest that the Athenian lovers flee too becomes a kind of symbol for the opposite of town life with its rules and regulations. The forest is conceived of as a place of possibility and, particularly in A Midsummer Night's Dream, a place of chaos and emotion, where surprising things can and do happen.
In terms of differences, A Midsummer Night's Dream differs from As You Like It in that it consciously involves the supernatural through the inclusion of Oberon and Titania's feud, which interestingly mirrors (in some ways) the relationship between Theseus and Hippolyta, and the addition of Puck and the other fairies. Also, this play uses a play-within-a-play in the form of Pyramus and Thisbe, which is interesting as it allows drama and acting itself to be held up and examined, and to be satirised in the form of criticism directed at Bottom and other actors, whilst also pointing towards the thin line that exists between tragedy and comedy. The ending of Pyramus and Thisbe is of course a tragedy, and the play itself bears many similarities with the situation of the Athenian lovers, that points out how easily things could have ended very differently indeed. Note Bottom's final lines as Pyramus:
My soul is in the sky,
Tongue, lose thy light,
Moon, take thy flight.
Now die, die, die, die, die.
These closing words are ridiculous and exaggerated, allowing Shakespeare to poke gentle fun at the various excesses of actors, yet at the same time it is interesting to reflect on what the Athenian lovers would have been thinking to see a story played in front of them that so closely mirrored their own situation. This is one of the key differences between these two Shakespearean comedies.