The Importance of Being Earnest is Oscar Wilde's most famous play, and a modern comedy of manners.
Since Wilde was both a satirist and a master writer, although not a linguist; he was known for puns and epigrams (short, memorable statements). The full context for the quote is as follows:
JACK: My dear Algy, I don't know whether you will be able to understand my real motives. ...in order to get up to town I have always pretended to have a younger brother of the name of Ernest, who lives in the Albany, and gets into the most dreadful scrapes. That, my dear Algy, is the whole truth pure and simple.
ALGERNON: The truth is rarely pure and never simple. Modern life would be very tedious if it were either, and modern literature a complete impossibility!
JACK: That wouldn't be at all a bad thing.
(Wilde, The Importance of Being Earnest, eNotes eText)
Because most of the play involves the various lies and deceits told by the protagonists, any expression of the truth is suspect. While they do not see their small lies as being harmful, both discover that their own small lies echo larger ones told by their peers and society as a whole. Truth in their eyes is entirely malleable; Algernon remarks that "modern life would be tedious" if truth were either pure or simple, showing that he finds joy in small deceits. Jack, however, says that the absence of "modern literature" would be somewhat a good thing, echoing Wilde's own sentiments.
Essentially, the quote refers to the small nuances of truth; most "truth" is only true as far as it is verifiable, and much truth is only opinion. Algernon says correctly that truth is never simple, as most of it always requires explanation of the deeper layers, and the purity of truth is always suspect.