Sure, he may have been talking about whether to live or die, but I think there's more truth here than that. What does it mean "to be or not to be"? To exist? Who's to say you exist at all? YOU? If there is any answer, that must be the only one. I have no way of knowing you really exist at all so how can you? How can you prove it?
Perception is reality.
You can tell me to touch you, but I cannot feel.
You can tell me to see you, but I cannot see.
You can tell me to okay... you get where I'm going with this.
Point is, if we lack our sense, we lack perception.
You're crazy. You're strapped to a bed. Your eyes are staring vacantly at the ceiling. You don't blink. Behind those eyes though... Behind them you're thinking. In your head you're reading this post on the internet. Me sharing this with you is your brain trying to make sense of the situation. No? You sure? What if I'm the one in the bed you ask? You're right. I am. We all are.
Who's to say you exist at all? You. Only you. Question now is, how do you exist?