The Queen Mab speech comes just before they go to the party. Romeo has been a lousy friend as of late--self absorbed, depressed and in the midst of an unrequited love that has no hope of ever being requited. In part this scene helps to establish a disconnect between Romeo and Mercutio, and helps also to establish Mercutio's values and personality in contrast to Romeo.
When Mercutio says that Romeo speaks of dreams, and, therefore, speaks of nothing, he may not simply be spinning words, but may be pointing out to Romeo how far from reality he has strayed with his imaginary love affair with Rosaline (if this is the case and if it does affect Romeo, then it may have had a pivotal effect in the play by opening Romeo's eyes to the possibility that he might have a real love);
The problem with visiting with faeries is that one can get lost in faerie land. Certainly they give us the illusion that we get what we dream of, but it is just that: illusory and insubstantial. It is also not exactly what we wish for (Queen mab visits Ladies who dream of kisses, yet gives them blisters because their breath is bad). In this sense, the scene offers glimmers of foreshadowing for Romeo--he may seek his heart's desires but, like the Ladies, may receive some scourge as a result of some condition he already has. At any rate, the potential with faeries, and especially with Queen Mab (if she is indeed drawn from the Irish Mahb) is to lead one astray. The irony, of course, is that it is a requited rather than an imaginary love that is the source of his undoing.
In these lines (1.4.53; 1.4.75; 1.4.88) the non-romantic Mercutio is comparing Romeo's own romantic leaning to myth. Queen Mab was an fairy of Irish folktales. Scholar H. Ellis also notes that "Queen" may really be "quean," a "slattern or low woman." Either way, or both ways, Mercutio does not hold much stock in women or love.
Mab was thought to be retributive of lovers, thus the note "oft the angry Mab with blisters plagues" (line 75).
In lines 88-89, the allusion to Mab braiding horse hair stems from superstition that elves matted and tangled both human and animal hair at night.
Romeo and Juliet
Ed. Brian Gibbons