Why does Hamlet say "to be or not to be" and what does it mean in Hamlet?
I think it is entirely possible that Shakespeare wrote the “To be or not to be” soliloquy as a separate piece expressing his own personal feelings about life and death and then put it away in the bottom drawer, as writers will do, until he found a convenient spot for it when he was writing his play Hamlet. What is important in this soliloquy, and what explains its great popularity, is the truths it tells about human existence, not what it reveals about the character of the moody Prince. We have all personally experienced some of the slings and arrows Hamlet complains about, just by being alive and having to deal with people and struggle to keep a niche in the crowded, competitive world. And we have all felt discouraged and wondered whether existence was really worth the trouble.
If we haven’t experienced all the slings and arrows personally, we have seen others suffering and have wondered why some people will continue to cling to life when they get nothing out of it but hard work and suffering. If we live in a city we commonly see people who are totally blind trying to find their way by feeling the pavement with long white canes. We see men sleeping in doorways on the cold concrete. We see men rummaging through dumpsters and trash receptacles trying to gather a few cans and bottles they can sell for enough to live on for one more day. We see all sorts of ugliness and deformity. We see old people hobbling along, hoping to survive just a little bit longer, although they have nobody to care whether they live or die.
Shakespeare itemizes some of the negative aspects of human existence in this soliloquy. They deserve more attention than the worn-out questions of what Hamlet is really thinking about or whether he is really contemplating suicide. We have all personally experienced “the proud man’s contumely,” “the pangs of despised love,” and “the insolence of office” (if only at the Department of Motor Vehicles).
Charles Dickens’s novels offer excellent examples of some of the “outrageous fortune” which Hamlet summarizes in just a few lines. In his novel Bleak House, Dickens describes the effects of “the law’s delay” in the interminable case of Jarndyce v Jarndyce, during which the lawyers of his day, like a flock of vultures, picked the estate clean and left nothing but the bare bones. In his novel Little Dorrit, Dickens illustrates “the proud man’s contumely” and “the insolence of office” in his characters’ dealings with the Circumlocution Office. In that great novel, his character Daniel Doyce, who has been trying for years to patent an invention, is an example of “the spurns that patient merit of th’ unworthy takes,” while both Little Dorrit, who loves Arthur Clennam, and Arthur Clennam, who loves "Pet" Meagles, offer good examples of “the pangs of despised love.”
Shakespeare was probably talking for himself when he wrote those famous lines beginning with “To be, or not to be.” He had had a rough life and knew—better than any spoiled prince--what it was like to have to struggle for survival in a brutal city like London of the sixteenth century. How could he have written them otherwise?
This famous quote comes from one of the most important lines from Shakespeare. Hamlet delivers this soliloquy in Act III, scene 1, and it centres on his arguments for committing suicide in what is to him a world that only brings him pain and sadness.
The quote you have asked about is interesting, because, as the starting line of the poem, it examines the question of suicide as a logical question, which is why he speaks the soliloquy. "To be or not to be" is basically logically posing the question of whether to live or not to live is to be preferred.
Hamlet develops his argument by asking whether it is more noble to just endure and suffer life passively in the face of this sadness and suffering or to actively look to end that suffering. Suicide, in the face of this logical questioning, is a "consummation / Devoutly to be wished." The argument that makes Hamlet pause is the question of what might happen in the afterlife. Even though he compares death to a "sleep," he reasons that, potentially, the kind of dreams that may come in that "sleep" must "give us pause." This, then is what the soliloquy means in Hamlet.
One can image Shakespeare #1, aka Will Skakspere of Stratford, suffering the slings and arrows of London, but one might also imagine Shakespeare #60, aka Edward de Vere, suffering the slings of losing control of his property and the arrows of almost being hanged for accidentally killing a man.
In the famous "To be or not to be" soliloquy, Hamlet wonders whether to live or die, given the pain he feels at his father's death/murder, and his mother Gertrude's hasty remarriage to the murderer. In this soliloquy, he wonders if it is nobler to bear his grief, or to take action.
His father's ghost has told him what happened and demands revenge. Hamlet has two ways of taking arms against the sea of troubles he faces--commiting murder, or committing suicide. In his belief system, both would lead to eternal damnation. Ay, there's the rub. There's the nightmare that troubles the eternal "sleep" of death.
Thoughts of what could happen after death "give us pause". He wonders who would bear the injustice and disappoint-ments of life, knowing suicide would end these. It is the "dread of something after death (that) puzzles the will and makes us rather bear those ills we have/than fly to others that we know not of..."
The next line is one of Shakespeare's famous double entendres, full of irony: "Thus conscience does make cowards of us all": conscience is both knowledge and knowledge of right and wrong. He goes on to say that " thus the native hue of resolution/is sicklied over with the pale cast of thought; enterprises ...lose the name of action." This conflict between thought and action is an oft explored theme in this play. It is perhaps too facile to call it procrastination as it is also about the conflict of reason versus rationalization.
Finally, catching sight of Ophelia, Hamlet asks (whether or not she hears him) that she remember his sins in her prayers (orisons). As this soliloquy reflects, it seems that everywhere he looks, everything he considers--whether inaction, murder, or suicide--he is doomed.
'To be, or not to be' is the famous quote from hamlet. It bases itself around the human condition and draws into question; Why do we struggle with life if we know inevitably we are going to die (which is the mark of humanity).
Hamlet tries to imagine death as eternal sleep (takes away troubles), but even in sleep we are still active through our dreams.
Throughout the play the common theme he asks himself is whether or not it is more noble to just put up with the everything or to fight against hardships.