Oscar Wilde used his writings as a conduit of his own opinions about society. Two of the things Wilde detested the most were the concepts of marriage and married life. He felt that the courtship process was ridiculous and that the expectations placed upon men and women alike by society were nonsensical.
For this reason, the characters of Lady Bracknell, Cecily, and Gwendolen seem to share one thing in common: A preference for all the superficial and trivial aspects of marriage, hence rendering it as a silly institution with no real prospects. The women in the play represented Wilde’s aversion to marriage, and were characterized by their silly reactions towards it. Cecily and Gwendolen, were fascinated by the name "Ernest" and were willing to commit to marriage just for the sake of the name. We also know that Lady Bracknell is snobby, elitist, classist, mean, and only interested in material possessions. To her, marriage was a business transaction that would ensure the future of her daughter in society. All the drama that transpired among the women in the play occurred as a result of their views on marriage, and how badly they wanted it. However, nowhere in the play do we see the real reason behind their penchant for marriage, nor can we define clearly their true feelings and thoughts about it.
Contrastingly, neither Jack nor Algernon take marriage seriously. Even Lane, Algernon's manservant, says that his marriage was caused by a "misunderstanding between himself and a young person". Therefore, while the women battled, and planned their lives, around their own concepts of marriage the men hardly paid attention to the topic and clearly placed their own personal interests before it. Jack is the character most closely interested in marriage, but we still do not know to what extent he would be willing to commit to Gwendolen. We find the same situation with Algernon.
Therefore, the theme of gender in the play is treated under the subtopic of marriage and relationships. It is clear that Wilde wants to show the differences in mentality between men and women when it comes to commitment and stability. Through these differences, we can also perceive Wilde's partiality towards the idea that men can only be happy if they are free to do what they want.