It is very important. However, being a fair person, Hamlet hesitates to act too rashly without proof that the ghost speaks the truth. This is one reason why Hamlet waits around seemingly forever before doing anything about his situation.
Revenge is a major motivator for Hamlet. His sorrow and grief over his father's death escalates to a desire for revenge when he is visited by his father's ghost. King Hamlet demands for his son to get revenge for his murder. The situation is made worse by his mother's apart fickleness is remarrying so quickly. Unfortunately, when Hamlet fails to take the opportunity for revenge when Claudius appears to be praying, his lack of action seals the fate of all the characters in the play.