Oscar Wilde, like many writers of the late 1800s, was an iconoclast bent on the deconstruction of Victorian values. Much of the irony in The Importance of Being Earnest serves this purpose. Wilde said that the philosophy of the play was to "treat all the trivial things of life seriously, and all the serious things of life with sincere and studied triviality." This irony had the effect of satirizing the things that the Victorians held dear.
It's ironic when Gwendolen speaks of the "age of ideals" that they live in and follows that up with her personal ideal "to love someone of the name of Ernest." Much of Lady Bracknell's interview with Jack is ironic: things she should find inappropriate she embraces, and things that shouldn't really matter are deal-breakers for her. She approves of his smoking and the fact that he acknowledges his "natural ignorance," but she heartlessly condemns him for having lost both his parents. This is a way of mocking the high-society method of seeking favorable marriage matches for children.
Wilde doesn't only poke fun at parents. Cecily represents youth, and her ironic fascination with the wayward "Ernest" is a critique of the fickleness of women who should value integrity in men but often don't. Wilde isn't above ridiculing his own profession: Miss Prism switched her three-volume novel with the baby in her care, and both Cecily and Gwendolen keep diaries since "one should always have something sensational to read in the train." The madcap ironies of the false identities of Ernest and Bunbury are a way of exposing the hypocrisy of polite British society.
Wilde uses irony expertly to expose the faults of his society and to question the values of Victorian England.