How does Wilde make the characters, although wicked and decitful, funny?
Oscar Wilde, in writing The Importance of Being Earnest, aims to appeal more to the basic Id -the naughty side- of all individuals, rather than to a storyline, when he develops his characters.
In the character of Algernon Moncrief, for example, he exalts those inner demons that we all wish we could exploit without consequences. Eating heavily, not paying bills, running away from responsibilities at a moment's notice, living above one's means, and looking sharp at all times are some of Algernon's favorite things to do. This directly appeals to the senses of an audience who would wish to have as many liberties as that. However, what makes Algernon funny although wicked and deceitful is that he openly declares that he is perfectly happy living that way. The fact that Algernon, with his charm and sarcasm, is able to get away with everything and not regret one thing makes it impossible not to giggle even a bit. After getting to know Algernon's bigger- than- life character you get to realize that he maybe even deserves to get away with it, after all. This, with the inclusion of the famous fake invalid friend "Bunbury", makes the audience understand the mockery of it all. Algernon even calls his mischievous escapes "Bunburying". That should say a lot about someone who really does not care about being "good".
With Jack, who is the main character and Algernon's counterpart, the story is similar. Jack is raised by a rich man who, upon his own death, leaves him in charge of his large estate and of the guardianship of the man's daughter, Cecily. Jack is a young man, and this is a lot of responsibility. Hence, he invents an bad brother named Earnest who supposedly lives in London causing all kinds of mischief- ironically, very similar mischief as Algernon causes in his everyday life: Unpaid restaurant bills, and creditors running after him everywhere he goes. However, Ernest is his only escape from the everyday tortures of a boring life in a country estate.
When Jack and Algernon meet in Algernon's London flat, the two of them are not aware of each other's double lives until Algernon finds evidence of it in a cigarette case that Cecily gives Jack addressed as "Uncle Jack". This finding is funny as well because we realize how fond Algernon truly is of leading double lives and the admiration he professes for Jack after the discovery is quite humorous.
Nothing will induce me to part with Bunbury, and if you ever get married, which seems to me extremely problematic, you will be very glad to know Bunbury. A man who marries without knowing Bunbury has a very tedious time of it.
Also, Wilde makes the communication between the two men quite silly at times, yet, amusing:JACK:My dear Algy, you talk exactly as if you were a dentist. It is very vulgar to talk like a dentist when one isn't a dentist. It produces a false impression.
ALGERNON:Well, that is exactly what dentists always do. Now, go on! Tell me the whole thing. I may mention that I have always suspected you of being a confirmed and secret Bunburyist; and I am quite sure of it now.
Therefore, it is the witticism of dialogue and the silly situations what mix together to make a very ironic setting where anything goes with the same flow of satire as if it were a serious situation.