The nunnery scene is a result of Hamlet’s issues with both his mother and Ophelia. One has been sleeping around and married his uncle, and the other just declined his advances. To his mother, the phrase is a call to change her promiscuous ways. To Ophelia, it is mostly an expression of Hamlet’s jealousy – if he can’t have her, no one else should.
The phrase from act 3, scene 1 of Hamlet might have two meanings. They depend on the reader’s interpretation of the word “nunnery,” but they ultimately covey the same message. Hamlet is clearly in love with Ophelia at this point in the play. Yet she does not reciprocate the way he wants her to. He’s already angry at his mother for having relations with his uncle Claudius. So he projects this anger onto Ophelia.
Besides, Hamlet just found out that his friends, who came to see him, were recruited by Claudius. The alleged killer of his father sent them to scout for information about his mental state. From Hamlet’s perspective, every person in his close surroundings is against him. With that in mind, it wouldn’t be so hard to believe that Hamlet suspects Ophelia. In his opinion, she can be involved in the plot as well.
Filled with hatred for humanity, Hamlet asks Ophelia:
“Why wouldst thou be a breeder of sinners?”
He sees no meaning in getting married and giving birth to produce more horrible people like Claudius. Perhaps that’s why he tries to prevent his love from making a fatal mistake. In this sense, Hamlet’s attitude towards Ophelia is positive, as he is only trying to help her.
It’s also possible that all this figurative language means is that Hamlet is jealous. He loves Ophelia so much that he would instead make her live in chastity than see her be with someone else. However, his other words do not indicate that he seems to be criticizing Ophelia. He may not even accuse her of cheating. This brings us to another way to explain what Hamlet is saying in lines 154-162.
If you ask what is a nunnery now, you would be told that it’s a religious community with strict traditions. In Hamlet’s times, though, the word was often used in a different meaning – a brothel. If Hamlet does suspect Ophelia of betrayal, this meaning would be quite fitting. The issue is, Hamlet has no real ground for such accusations but makes them anyway.
Looking at Hamlet’s relationship with his mother, it’s easy to see why his attitude towards women is biased. Even though he admires Ophelia, his unresolved conflict with his mother interferes in their relationship. He suspects that Gertrude was cheating on his father and cannot help expanding that to other women.
Amazingly enough, the phrase with so many meanings has gained some popularity in the modern community. The younger generations use the take thee to the nunnery meme as a “fancy” way to tell someone to get lost.