The ghost is a symbol of the troubles coming to Denmark. When Horatio, who first disbelieves the guard's tale of seeing a ghost, actually witnesses it with his own eyes, he is unnerved. He states it is a warning that dire events are coming and mentions the way the ghosts rose from their graves in Rome right before the assassination of Julius Caesar. That the ghost appears in full armor is also a fearful sign that bloodshed is in the air. Horatio says:
Such was the very armor he had on
When he the ambitious Norway combated
When Hamlet hears the report that his father's ghost appeared in armor, he too fears that "all is not well."
The ghost's appearance is an ominous sign of a world out of joint, foretelling disaster for Denmark. Spirits only walk the earth when heaven and earth are out of alignment.
That the ghost wears armor, and specifically the armor in which he killed the late Fortinbras, also shows the price of violence. Fortinbras's son, also named Fortinbras, is now marching with an army towards Denmark, seeking revenge for his father's death. The cycle of revenge will haunt this play from beginning to end.