When Bernardo arrives to relieve him in the opening scene of Hamlet, Francisco says:
For this relief much thanks: 'tis bitter cold,
And I am sick at heart.
Francisco has been there all alone, in the dark, late at night. Both these men have seen Hamlet's father's ghost and are afraid it will come back again. Francisco has been dreading encountering the Ghost while he is all alone on the battlements. Bernardo is not keen about being up there alone either. He tells Francisco:
This is an effective way of opening the play. It captures the attention of the audience, which was always a problem in the noisy, unruly Elizabethan theaters. Shakespeare often used strange or dramatic devices to quiet his audience and get them curious and involved. Another good example is his opening of Macbeth with the three witches chanting:
First WitchWhen shall we three meet again
In thunder, lightning, or in rain?
Second WitchWhen the hurlyburly's done,
When the battle's lost and won.
Third WitchThat will be ere the set of sun.
First WitchWhere the place?
Second WitchUpon the heath.
There to meet with Macbeth.
The fact that Bernardo is "sick at heart" shows that there is something strange going on, but the audience will not understand what it is until it is explained to Horatio, who is the only man who has not seen the Ghost and remains skeptical about their stories until the Ghost actually appears. There can be no doubt that Shakespeare's audience was silenced by this time--but they will become spellbound later on when Hamlet himself encounters his own father's ghost and hears his tale.
Shakespeare cleverly introduces the subject of the Ghost before the Ghost actually appears, and then lets the minor characters see the Ghost before Hamlet himself meets with him. This way the audience is sure to recognize the Ghost as a ghost and not just another minor character in the drama. The audience will know who and what the Ghost is because of the way it has been described to Horatio and then described in considerable detail by Horatio to Hamlet later on. To get the maximum uncanny effect he desired, Shakespeare wanted to be sure that the audience would fully believe they were looking at and listening to a real ghost, which is like seeing a dead man brought back to life.
There are two intervening scenes before the Ghost appears in Act 1, Scene 4 and then holds a long meeting with Hamlet in Act 1, Scene 5. This manner of presentation is intended to keep the audience in suspense, wondering whether they will see the Ghost again and what purpose it has in haunting the battlements. Horatio believes the Ghost will speak to Hamlet. The audience wants to find out whether Horatio is correct and what it will have to say.
What the Ghost has to say is the most important information in the entire play--that Claudius is a murderer and a usurper and that Hamlet is obliged to kill him to avenge his father. The audience has been well prepared to listen carefully and remember what is said.