Oscar Wild and Bernard Shaw were two of the most known and important playwrighters of the 18th century.They were strong personalities,with ideas far beyond their time,especially as far as morality is concerned.The subject of morality as it is conceived by them and by society,is represented in their play's and they criticize it according to their political ideas.
O.Wilde and B.Shaw were born during the Victorian period and were Irish.Both of them were against Victorian Capitalism.O.Wilde believed that capitalism and the morals it represented denied people their right to live their life as they wanted.He dreamed of a society with freedom of expression,where art and literature would play an important role.Furthermore he believed that socialism would bring the end of marriage as it was.Relationships would became more free and people wouldn't marry,according to their social status.Also it would mean the end of crime as people would have enough to eat.
Likewise B.Shaw believed that socialism was the answer to society's problems.He argued that 19th century capitalism had divided society into two classes.He defended the wrights of women against the capitalist society.Shaw's beliefs are almost the same with modern day feminism but he also feared that woman's independence would damage the family and the sense of love.
Moreover they both attack conventional morality.Due to O.Wilde's homosexuality that was considered a criminal offence at that time,he was against this conventional morality.He went to jail and was released 2 years later and died as an outcast.
Also O.Wilde and B.Shaw worked to develop a public persona,but their difference was that Wild used it to define an aesthetic point and Shaw used it to present ideas.
As far as "The importance of being Earnest" is concerned,the play satirizes the aristocracy of the time,the upper class.Who's life's are concerned with manners and customs.The characters lie to be rewarded with love and better social status but later they find out that they haven't been lying at all.