Both drama and novels are a type of narrative; they have a story arc with rising action, a climax, and falling action. But each form has its own strengths and weaknesses. A drama is meant to be performed; it is an art form that includes visual and auditory elements. A novel, on the other hand, it strictly words and is "performed" only in the reader's mind.
The strengths of drama are that live actors deliver the lines and by their delivery and physicality can make characters come alive. Little quirks of expression or movement can add humor or sentiment to a character beyond what the actual words of the script provide. Additionally, elements such as the set, lighting, sound effects, and choreography work together to make the drama an experience for the viewer. Within the space of an hour or two, the viewer enters into the world created by the drama, willingly suspends his or her disbelief, and can be not only entertained but often changed by the emotions aroused during the play.
A novel has its own strengths. Since the reader must imagine the action, settings, and how the characters look, a greater depth of experience can be achieved by taking the reader to a variety of locations and allowing the reader to get to know a variety of characters more deeply than a play would allow. A novel is usually not consumed all at one sitting but may occupy a period of days or even weeks. This allows the reader to contemplate and relive the action and dialogue of the novel many times as he or she considers the part of the novel already read while going about his or her day-to-day life. In this way a novel can produce a deeper, longer-lasting impact on the reader than a play might be able to do. A novel has another advantage over drama in that it allows the reader to get inside the head of a character or even multiple characters. In a play, we only learn what a character thinks from listening to what he says or watching what she does. Sometimes actors will perform soliloquies--speeches where they speak to themselves--but this doesn't occur that much in modern drama, and when it does, it can make a drama less believable. In a novel, we can follow a character's inmost thought processes seamlessly as the action of the story unfolds. Thus a novel has the ability to create more empathy in a reader because it more readily allows the reader to know what it "feels like" to be in another person's shoes.
In The Importance of Being Earnest, Wilde's goal is to satirize and trivialize what his society thought was important, and the medium of drama was well-suited to that purpose because a deep, sustained intimacy with the characters is not necessary for his theme to come across. Indeed, in his portrayal of society as a place where everyone plays a role, drama created a perfect illustration of his point. This work would be much less effective as a novel, but as a drama, it is brilliant.