First, we should note that Oscar Wilde's The Importance of Being Earnest is a British play, first performed on 14 February 1895 in London. The "tea ceremony" is a Japanese tradition, not a British one. Although the British upper classes in the Victorian period typically had "afternoon tea", a light meal served in the late afternoon consisting of tea, small sandwiches, and pastries (such as scones), this is properly referred to as "tea" and should not be confused with the Japanese tea ceremony.
There are two teas portrayed in the play, the initial one in Algernon's house in London and the second one in the country house where Cecily resides. Both provide a backdrop to significant interactions among the characters.
The first significant element both share is that they indicate to us the socio-economic backgrounds of the characters. The meal itself, the presence of servants, and the conventions of politeness all suggest upper class characters. This is important because it provides a context for the relationship issues discussed in the play.
The most important event is that Jack proposes to Gwendolyn during tea and Lady Bracknell provides the comic obstacle to the marriage that drives the plot of the play. It is also during the first act that Algernon first hears about Cecily, which drives the second love plot of the play.
The teas also provide the occasion for some of the dazzling word play for which the play is so well known, many of which tend to undermine the conventions of sentimental romantic drama. An example of this is:
Jack: “How you can sit there, calmly eating muffins when we are in this horrible trouble, I can’t make out. You seem to me to be perfectly heartless."
Algernon: "Well, I can’t eat muffins in an agitated manner. The butter would probably get on my cuffs."