In the play The Importance of Being Earnestauthor Oscar Wilde satirizes upper Victorian society through the use of literary devices such as the application of epigrams to the dialogue.
The purpose of the epigram is three-fold: First, it brings irony to a discussion by making a contradictory or conflicting statement in a funny and seemingly innocent way.
The second purpose is to keep the audience "awake", that is, to maintain the audience on edge with the knowledge that, at any moment, the character will produce an epigram that will, in turn, bring out the comedic character of the play.
Additionally, Wilde uses his epigrams to disguise his insults to the intended target. He detested the snobbery and hypocrisy of Victorian society. Therefore, what would be a better idea than to disguise an attack in the form of a joke?
A good example of an epigram would be when Jack and Algernon discuss the topic of women, and they conclude that:
All women become like their mothers; that is their tragedy. No man does; that's his.
Wilde also took a swing at the ignorance and petulance of Victorians when Lady Bracknell, the epitome of both characteristics, says:
To lose one parent may be regarded as a misfortune. To lose both looks like carelessness!
Marriage is one of the most targeted topics in the play of which Algernon, clearly mirroring Wilde's own feelings about it, says:
I really don't see anything romantic in proposing. It's very romantic to be in love but there's nothing romantic about a definite proposal. Why, one might be accepted. One usually is I believe. Then the whole excitement is over. The very essence of romance is uncertainty.
Therefore, the use of epigrams in the play The Importance of Being Earnest, as well as in Wilde's works in general, has the goal of entertaining the audience, adding spice and comedy to the dialogue, and disguising the inner thoughts of the writer himself.