Hamlet spends the first half of the play ensuring that the revelations of the ghost are in fact true. During Shakespeare's age, it was a common thought that ghosts could be coming to provide news (like in this case) or could be a devil in disguise of a loved one to cause harm. Hamlet needs to make sure that Claudius is in fact guilty of murder, or else Hamlet's revenge would be considered murder and he would be the law-breaker. He is concerned with the law of the land as well as God's laws. Revenge for murder was considered honorable in Hamlet's age, but it is murder, and that is troubling, especially to Hamlet. There were actual laws on the books in regards to these kinds of situations -- note the reference listed below.