As so many characters lose their lives in the course of Hamlet avenging his father's death, I can see it may be necessary to consider the political significance of regicide and its implications at the time rather than simply focusing on the human drama of the events. That said, Hamlet himself appears to gain little for his pains to avenge his father.
If you take "an eye for an eye" to be a justification for action, then Hamlet is certainly justified in his revenge on Claudius. There were certainly codes of justice in 15th century Denmark, but an elaborate court system like we know today did not exist. Crimes have consquences, and Claudius actively tries to "get away with" his crimes throughout the whole play, so it is especially justified when he his plot to KILL Hamlet turns around on him so swiftly.
When issues of state are concerned, there seems to be a different standard set for "revenge." Claudius is an enemy of Denmark since he has killed the king. Once his villainry has been established, Hamlet feels justified in taking action. This is why he declares himself "Hamlet the Dane" and sets out to ride his country of the corrupt court that exists. Rather than vengeful, Hamlet's actions are more patriotic.
Think about what you would have done if someone had killed someone you love. However, do not transfer your answer to a 21st century perspective because the time period intended for Hamlet was much more barbaric and ruthless than modern times.
This being said, you could conclude that Hamlet did have a good motif for vengeance that may be, perhaps, misunderstood in our modern times. We do not take the law by our hands these days (at least we are not supposed to), even if you are a king, a president, or a prime minister. Instead, modern times call for common sense and less instinctive behaviors. This was unknown in Hamlet's "time", so perhaps his anger and actions could have been justified then. But, certainly, not now.
I think that you have to decide when revenge is or is not justified. You have to ask yourself under what circumstances it is acceptable to kill someone for revenge. You need to ask, for example, if Claudius's action in killing Hamlet's father was bad enough to warrant being killed. You should then ask yourself if it was right for Hamlet to try to do the killing himself, rather than pursuing some more legal form of revenge.