What does "time is out of joint" mean to Hamlet?
Hamlet says "time is out of joint" in Act I, scene 5, expressing his idea that his world is not sane and that things are not as they should be. In this scene, the ghost of King Hamlet asks Hamlet to avenge his murder by killing Claudius but leaving Gertrude, Hamlet's mother, alone. Hamlet says earlier in the scene, "There are more things in heaven and earth, Horatio,/ Than are dreamt of in your philosophy" (I.5.169-170). In other words, the news that his own uncle has killed his father has made Hamlet realize that the world is a big and confusing place, as he tells Horatio, far more complicated than Hamlet had earlier imagined. He is in a state of shock.
At the end of the scene, Hamlet says, "The time is out of joint. O cursèd spite,/ That ever I was born to set it right!" (I.5.190-191). Again, this means that Hamlet knows now that his world is not right. If time is not right, then nothing in the world is working correctly. He curses the ghost that came to him to tell him the truth about his father's murder, and he rues that he has to make the situation "right," meaning that he has to murder Claudius to avenge his father's murder.
When Hamlet says that "The time is out of joint," he is lamenting the fact that he is alive during this tumultuous and upsetting time. His father has been murdered and has gone to Purgatory, and his uncle is the murderer. Further, his uncle has married his sister-in-law (Hamlet's mother, Gertrude) in a what amounts to an incestuous relationship, according to the Bible. The wedding took place within two months of his father's death, and his father's ghost has returned and charged him with avenging the murder.
Overall, it is certainly an odd and overwhelmingly negative time in Hamlet's life—as well as being horribly disruptive to the country's well-being. Hamlet is feeling the heavy weight of responsibility to "set [things] right," and so in this quotation, he curses the fact that he is the party now responsible for doing so.
It means that things have gone all wrong in the Kingdom, and he is lamenting the fact that it has fallen to him and his destiny to put it right-- which is what the Ghost basically asks him to do.