"The mention of Marley's funeral brings me back to the point I started from. There is no doubt that Marley was dead. This must be distinctly understood, or nothing wonderful can come of the story I am going to relate. If we were not perfectly convinced that Hamlet's Father died before the play began, there would be nothing more remarkable in his taking a stroll at night, in an easterly wind, upon his own ramparts, than there would be in any other middle-aged gentleman rashly turning out after dark in a breezy spot -- say Saint Paul's Churchyard for instance -- literally to astonish his son's weak mind."It's in the midst of the opening section in which the author is making it clear that Scrooge's old partner Jacob Marley is dead and died before the story began, should the reader, or more specifically the Victorian reader less schooled in fantasy elements, suspect that Marley's Ghost could be anything other than an apparition.
Invoking Hamlet Snr cleverly reminds the reader of another, very famous and at the time still very accessible example of a ghost to prepare them for what the text is about to throw at them. It's rather like Back To The Future being cited in Doctor Who's The Shakespeare Code to explain how time travel works.