Horatio is a good guy. He is also, depending on the point in the play, a touchstone, a foil, and a catalyst. He is a touchstone in that people trust him; if he says something, it is true, and he's trying to do the right thing. This happens when he brings news of the ghost to Hamlet. He wants things to work out, so he transmits information, and stands by it (and the person) to help. That's why Hamlet asks him to stay alive and bear witness at the end of the play.
Along the way, he is a catalyst and foil, meaning he helps things move along or come into being without changing much himself. This applies to the ghost information, but also when he watches Claudius for Hamlet.