Hamlet's main strength as a character, though not necessarily as an agent of revenge, is his intelligence. Even Polonius, who believes Hamlet mad, remarks on how "pregnant" with meaning his replies were. Indeed, we see how Hamlet's jibes often go over Polonius's head, in particular his "fishmonger" joke. But Hamlet's intelligence goes beyond witticisms. More than any other of Shakespeare's tragic heroes, Hamlet spends his time contemplating the larger, philosophical conundrums raised by the events around him. He is preoccupied with death, to be sure, but he also ponders love, the morality of revenge, the presence (or absence) of morality in general, and other issues. Again, his introspective nature probably forestalls vengeance, but it also makes him a fascinating character and adds enormous depth to the play.
While Hamlet is often criticized for being indecisive, in some ways that is actually a strength. Rather than rushing in blindly, swinging a sword, Hamlet normally takes time to assess the information about a situation carefully, making sure that he really understands what is going on before he acts. Thus he is very careful to make sure that Claudius is indeed the murderer of his father before killing him.
Next, Hamlet is extremely patient and self-disciplined. He is willing to feign madness and bide his time until his plot comes to fruition rather than letting his impatience to see his revenge completed lead him to act precipitously. He is also very single-minded, not letting his affection for Ophelia distract him from his task.
Finally, he is clever and imaginative, able to create original and complex stratagems. As he is still not sure whether the ghost is really a devil in disguise, he cleverly decides to use Claudius' reaction to a play as a way to determine guilt, saying:
... I'll have grounds
More relative than this: the play's the thing
Wherein I'll catch the conscience of the king.