The expression “to go to the dickens” is nothing more than a polite, or if not polite, at least euphemistic, way of saying “go to hell,” or to perdition, or to the devil, or to ruin in some uncomfortable manner.
It has nothing to do with the novelist, Charles Dickens, for “dickens,” in this sense, was known to Shakespeare.
He used it in Merry Wives of Windsor, Act III, scene 2, where Mrs. Page, in answer to Ford’s, “Where had you this pretty weathercock,” referring to Sir John Falstaff’s page, Robin, replies, “I cannot tell what the dickens his name is my husband had him of.”
But when and how “devil,” or whatever the original term may have been, became distorted to “dickens” has not yet been determined. One conjecture is that the original term may have been “devilkins,” little devil, which by frequent usage may have worn down to “dickens.”
We have many words in our present language derived through such a process, so this one sounds plausible, but, alas, no such use of “devilkins” or “deilkins” has turned up.