Derek Jacobi wrote the Foreward to the Everyman edition of Hamlet. (Rutland, Vermont: Charles E. Tuttle Co., Inc.) 1998. It's a four-page introduction, in which he spends more than two pages discussing the "to be or not be"/"get thee to a nunnery" scene. I think what he says is very, very interesting about Ophelia:
. . . the last thing Polonius has said to [Ophelia] is "Walk you here. Read on this book." but most Ophelias have to not "walk you here" but go to the wings or hide behind a pillar, or do something to get out of Hamlet's way, whereas the whole point of the scene is for her to confront him. If we presuppose that they have been lovers, that they are in love, then what better opportunity for him to be able to say, "This is where my head is at the moment: I'm thinking about committing suicide." He speaks at her, through her, around her. He soliloquizes to her, if you like.
Well, what does Opheila do while he's doing this? Does she just sit there? Yes indeed. What else can she do? She's in a very false situation, having bewen placerd there by her father and the King. She knows they are listening behind the curtain. She doesn't want to be there. She knows she's a decoy. It's a complete false situation to her. Hamlet is the man she loves.
I played Hamlet this way with two Ophelias, and both said it helped them with their character. Because the irony is that the speech ["to be or not to be . . ."] is about the the very things that happen to Ophelia -- madness and suicide. She goes mad, and commits suicide, virtually. Hamlet talks about both but experiences neither. In effect, though, hearing this speech plants the seed in Ophelia's mind.
There's quite a bit more, but it is all to the same effect: Ophelia betrays Hamlet in this scene, and he figures it out from the start of the scene. The big conclusion to Jacobi's point is, "For this point on [the end of the "get thee to a nunnery" dialog], Hamlet realizes that there is no one in his world that he can trust. Everyone is acting, and survival will depend on choosing and playing one's own role as shrewdly as possible."
This really makes bunches of sense to me. It makes Ophelia's role in the play pivotal on both a personal level with Hamlet, as well as in being the crux upon which the second half of the play turns.
One thing I thought Branagh did very well in his film version was that the relationship between Ophelia and Hamlet had a real back story with a lot of tenderness to it. It's not surprising that he might either agree with Jacobi or have come to agree with him about Ophelia: the two men have been friends for a long time, and they both have a deep affinity with this play.