The key points in Mercutio's speech about Queen Mab (invented by Shakespeare, given her debut by Mercutio, and borrowed by other poets like Ben Jonson)--who rides a chariot that inspires the fulfilment of disparate desires held by lovers, lawyers, soldiers and all else in between--are in this excerpt from Mercutio's speeches:
The collars of the moonshine's watery beams,
Through lovers' brains, and then they dream of love;
I talk of dreams,
Which are the children of an idle brain,
Begot of nothing but vain fantasy,
Which is as thin of substance as the air
And more inconstant than the wind,
These tell us that the central function of the Queen Mab speech is (1) to set up Romeo's switch from Rosalind to Juliet and (2) to foreshadow the switch as a result of genuine feeling and passion--not as a result of "moonshine's watery beam" or the "vain fantasy" of an "idle brain."
The confirming textual evidence of this dual purpose is the recurring motif of the idea of "inconstant." Mercutio invokes the motif thereby associating Romeo's love and pining for Rosalind with thin "substance as the air" that is "more inconstant than the wind." Juliet later echoes the motif, thus connecting the two, by bidding Romeo not to swear ...
by the moon, the inconstant moon,
That monthly changes in her circled orb,
Lest that thy love prove likewise variable.
Juliet and Romeo,by his affirmation of Juliet's request, thus remove their love from the realm of Queen Mab, the realm of airy dreams of no substance that are imbued by their very nature with inconstancy. So it turns out that Mercutio's Queen Mab speech is a pivotal point of thematic, character, and plot development.
The Queen Mab monologue is, indeed, delightful. In fact, Mercutio's "Queen Mab" speech is second in recognition only to Juliet's "Romeo, Romeo, wherfore art thou Romeo?"
Mercutio's speech resounds of those from Shakespeare's A Midsummer Night's Dream, a play that has its characters affected by the antics of fairies, and a drama beset with amorous complications. Mercutio, like Puck of A Midsummer Night's Dream, suggests the amorous complications of people and "what fools these mortals be."
I agree with all the previous answers. The speech also helps demonstrate Mercutio's wit and inventiveness, which is another way of saying that it helps demonstrate the wit and inventiveness of Shakespeare, including his creative uses of language. The speech helps to make Mercutio seem one of the most memorable characters in a play full of unforgettable characters. The more Mercutio tells us about Queen Mab, the more he characterizes himself as well. When Mercutio leaves the play, part of the life and vitality of the play dies with him. The tone becomes darker; we grieve for Mercutio as much as Romeo does.
I agree that the speech adds a contrasting view of love. It also shows us some of the darker sides of things are normal romanticised. It shows us a little about Mercutio's character as well. We start to see him as dark and brooding rather than happy go lucky. This understanding of his character comes into play during the scene between Mercutio, Tybalt, and Romeo where Mercutio dies. Through this speech we begin to see that things aren't necessarily the way they appear. Romeo's love for Rosaline and his subsequent love of Juliet are more than just the surface infatuation they appear to be. We see some of the foreshadowing of dark events to come.
I agree with Post 2. I think that Mercutio this is meant to be another early warning to us that Romeo's obsession with love is going to get him in trouble. He starts out playful, but then it seems like he gets really angry. I think that is supposed to indicate to us that this romance of Romeo's is going to end up as bad news. It does seem like a roundabout way of getting at the point, though, doesn't it?
The Queen Mab speech that Mercutio adds to the play points towards the way in which Mercutio is used by Shakspeare to provide a counterpoint to the overwhelming theme of romantic love that is captured in the relationship between Romeo and Juliet. Let us remember his closing comment that dreams "are the children of an idle brain." Some critics believe that this represents a criticism or at least an attempt by Mercutio to show Romeo the absurdity of romantic love.