This observation by Hamlet is one of Shakespeare’s most famous lines and the subject of being vs non-being was a recurrent theme of the Bard. On one level the issue in this famous soliloquy was merely that of physical existence, The morose young oedipally-conflicted neurotic was serotonin-depleted and questioned that it was worth it to toil on against those “thousand natural shocks that flesh is heir to” rather than opt for the “bare bodkin” (knife)
But a more substantive issue for Shakespeare than physical life or death was “being” itself—-“what does it mean to ‘be’ as opposed to ‘not be.’ This is best illustrated in Sonnet 146 when he lamented a “poor soul…pining within…painting thy outward wall so costly gay” while disregarding that inward estate which he saw as the real, concluding that we should instead “within be fed, without be rich no more.” (See http://www.artofeurope.com/shakespeare/sha6.htm)
Shakespeare saw that humanity had lost his way and was immersed in the ephemeral, making the mistake that John Masefield described as “like a lame donkey lured by moving hay, chasing the shade and letting the real be,” the state of affairs which C. S. Lewis later described as sin, “misplaced concreteness”. (For Masefield sonnets, see http://www.sonnets.org/masefield.htm)
The issue is an “external” reference point which…and here things get complicated…is not really “external” but “spiritual.” But to delve into the “spiritual” we must first use language…most of us anyway…and so we must use words like “external” to evoke images. Shakespeare was merely saying, “Hey, there is more to life than meets the eye!” and that is a message that humankind has always been averse to as it takes him out of the comfortable little orbit of his ego-bound day-to-day life. But, in spite of this aversion, there is still “more” out there and we ignore it at our own peril.