Horatio is Hamlet's closest friend, and he's the only one who really seems to deserve the title. Unlike Rosencrantz and Guildenstern (also Hamlet's old chums), Horatio's loyalty and common sense are rock-steady throughout the play.
In fact, one of the first things we learn about Horatio is his good sense. When we first see Horatio, he's been called to the castle by the guards because he's a "scholar" (he goes to school in Wittenberg with Hamlet). That means he should be able to judge whether or not the apparition that's been appearing on the battlements is actually a ghost. According to Marcellus, Horatio says that the ghost is "but [the guards'] fantasy, / And will not let belief take hold of him" (1.1.28-29).
He's convinced of the spirit's legitimacy soon enough, but his initial skepticism introduces the first note of doubt in the play, one that will haunt his friend Hamlet for several acts.