The answer to this depends on how literally you interpret this phrase. When Hamlet was speaking of "being" or "not being," he was referring specifically to death and life. Being means living, and not being means dying or being dead. That is the literal translation of that quote. Based on that translation, Hamlet chooses "to be." He doesn't kill himself, even though he longs to, which is what the entire point of his soliloquy is. He wishes he had the courage to die and get rid of his miserable life, but is too afraid of what comes after life to do it. So, in the sense of living or dying, Hamlet definitely chooses to live. We see his choice to live come into play again later as he discovers his friends have been ordered to kill him; instead of letting them and ending his miserable life, he connives his way out of them to live longer. Then, at the end, he fights to the death against Laertes, not wanting to die.
If you interpret his speech more symbolically, as meaning that "being" is acting being proactive in your life, and "not being" as sitting passively by and not doing anything to change your circumstances, Hamlet does a bit of both. Mostly though, he chooses "not to be," as he refuses over and over again to act out his revenge. He comes up with excuses, makes speeches, and procrastinates over and over again. It isn't until he is sent away and is standing on a battlefield surrounded by active warriors defending their country that he is inspired "to be," and he goes home determined to finally be proactive about getting revenge. So, on a symbolic level, Hamlet spends a good portion of the play choosing "not to be," before being prompted "to be." I hope that those thoughts helped; good luck!
In Hamlet's speech from Shakespeare's Hamlet (Act 3.1.56-88), the "to be" Hamlet says refers to existence: Hamlet is asking, to exist, or not to exist, that is the question.
The play opens with Hamlet suffering from melancholia, or depression. Before the opening line of the play, he suffers his father's unexpected death, his mother's hasty and incestuous marriage, and the loss of the thrown (to Claudius, who marries the queen). He is understandably depressed.
In Act 1 the Ghost appears and tells Hamlet that his father was murdered, and instructs Hamlet to gain revenge for him, but Hamlet, by the time he makes his "to be" speech isn't sure if the Ghost is really that of his father or if it might be a devil trying to deceive him.
Add to the above the fact that Ophelia and Ros. and Guil. have all turned against him, so to speak, and Hamlet is wondering whether or not existence is worth while. That is what the speech is about.
During the speech, Hamlet, so to speak, backs into an answer. He decides that existence is better than the alternative. He decides that since no one knows with certainty what lies on the other side of death, one is better off existing. "For who would bear the whips and scorns of time,..." he proclaims:
But that the dread of something after death,
The undiscovered country, from whose bourn
No traveller returns, puzzles the will,
And makes us rather bear those ills we have
Than fly to others that we know not of?
Hamlet chooses existence, not for any life-affirming reason, but out of fear of what lies on the other side of the grave.
As he says:
Thus conscience does make cowards of us all.