The scene in question sees Prospero deploying Arial, and promising him his liberty after two days, and then calling on Caliban. As such, it has several essential functions in the structure of The Tempest and in deploying its comic potential.
First, it shows Prospero's range of instruments. He has both good and evil spirits at his command, and so we can be sure that he will contrive some fitting revenge on the castaways for the situation they helped put him into. The interest of the audience is piqued and their attention is primed for what Prospero will do with his superhuman helpers.
Second, it creates tension by introducing a time limit. Prospero explicitly promises to release Ariel from his bondage in two days. This sets up the temporal pressure that helps intensify some of the farcial situations the characters are involved in later -- the audience knows that things must wrap up quickly.
Third, it introduces a note of lightheartedness. Ariel is clearly overjoyed at the prospect of his liberty. Moreover, we are warned of Caliban's character in advance, so his surliness does not have the dampening effect that it might otherwise have on our spirits. He too is, as Prospero properly notes, an essential part of the action.