First, the scene provides a bridge from Hamlet's declaration that he will "put an antic disposition on," in Act I, scene v, to this scene. Time has passed between these scenes. We aren't told how much time, but it has been enough time for Claudius and Gertrude to take note of Hamlet's "transformation" (as Claudius calls it) and decide to send for Rosencrantz and Guildenstern (R & G). So, giving the audience the understanding that time has passed is one significance.
Another, and more important, significance is to expose the behind-the-scenes sort of machinations that Claudius is up to in the play. He has called Hamlet's friends to court to have them serve as sort of spies against his own nephew. This exposes how concerned Claudius is that he maintain his seat as King, since, by true royal lineage, Hamlet should have been next in line for the throne, not Claudius. So, politically, Hamlet is a threat to Claudius. And, he seems to waste no time, upon seeing Hamlet's odd behaviour, in deciding to get to the bottom of Hamlet's actions. He couches it in a concern for Hamlet's mental health, but his intent seems pretty clear:
. . .I entreat you both
That, being of so young days brought up with him,
. . .That you vouchsafe your rest here in our court
Some little time, so by your companies
To draw him on to pleasures and to gather
. . .Whether aught to us unknown afflicts him thus
That, open'd, lies within our remedy.
These final lines of his speech indicate that he wants them, like a pair of spies, to give him information about Hamlet intentions.
Gertrude also supports the idea that it's business and not friendship they are plotting with R & G when she apparently offers them money for any information that bring the royal couple. She says:
. . .If it will please you
To show us much gentry and good will
As to expend your time with us awhile
For the supply and profit of our hope,
Your visitation shall receive such thanks
As fits a king's remembrance.
Gertrude, like Claudius, is very good at couching this crass request in polite and oblique terms, but the events of the rest of the play (when R & G are exposed as basically the King's henchmen) bear it out. The King and Queen are engaging the services of R & G as spies in Act II, scene ii. And the larger significance of this scene is that it is quickly becoming apparent in this play that Hamlet can trust almost no one (except Horatio) at this court.