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.