While in his famous essay on the play T S Eliot describes Hamlet as “certainly an artistic failure” because of all of the confusion in it, he still considers the first scene of Hamlet more economical and effective than Shakespeare’s other plays because he creates his atmosphere in a mere 22 lines. He identifies cold and fear (rather than suspense) as the prevailing atmosphere, accomplished by Barnardo, who nervously steals the sentry’s words; the setting of the midnight hour; Francisco saying “I am sick at heart”; the pace of the exchange between all four characters on stage; Horatio’s remark that only “a piece of him” is present; and then finally Horatio’s question about the ghost, scarily referred to as “this thing’ (line 21).
I would add that the suspenseful atmosphere in Act I.i also helps develop the existential theme that runs throughout the play. The night guards do not trust their own eyes when they think they see a ghost; rather than trusting themselves they must call upon the scholar Horatio to verify their finding. When Horatio sees the ghost as well, the guards take it as proof of the apparition. Many Elizabethans believed that only a scholar could initiate discussion with a ghost, so it is puzzling to them that Horatio is unsuccessful in his efforts to speak to the apparition. The guards assume that the apparition wishes to see Hamlet, who will surely have his own laundry list of questions about the ghost - questions which will drive the plot in the rest of Act I and much of Act II.
The prevailing atmosphere would be one of suspense. Shakespeare introduces the ghost immediately, and this ghost appears twice amidst discussions of why it has appeared and what it could possibly want. The audience has a sense of the mystery along with the characters. The scene also serves to introduce some characters and the conflict with Fortinbras.