Really, the opening scene of Hamlet is like a prototype for the beginning of a horror movie: it's night, the fog is so thick the soldiers can't recognize each other, and an air of foreboding and dread pervades the place. All this is preparing us for the appearance of the Ghost, which gives the audience both a tingle of anticipation, and a shiver of fear.
Horatio's initial skepticism ("Tush, tush, 'twill not appear"), is quickly dispelled, and he is as awed and, frankly, frightened as the sentries are, but, being well acquainted with the significance of omens, he is inclined to attribute the appearance of the specter to events happening in the country. When the Ghost reappears, and they try to halt it physically, and cannot, Horatio is ready to prepare his friend, Hamlet, for something that will challenge his beliefs and unsettle him even further.
All this is vital to establishing an atmosphere of unease, and a sense of being unable to grasp what is real and what is not.