This phrase "To be or not to be" is said by Hamlet, the most important character in the story. Hamlet is almost going to suicide because he said he lived in a world that only bring pain to him. He was so unhappy with the life he had and one day he says this phrase when he is almost going to suicide. He had to take revenge on Claudius who had killed his dad and that was one of the reasons he always lived sad. The phrase to be or not to be means what ever will happen is okay, like he did not care what was going to happen with his life, so he is demonstrating with this phrase he did not care more about his life he just wanted things to go one way or another and whatever happened with his life was going to be okay with him.