From the beginning of the play, we see that Hamlet is not one to easily disguise the way he feels. His melancholy over his father's death is obvious to everyone. He tells Gertrude that he has "that within that 'passes show" when she tells him to cast off his "nighted color." In fact, Hamlet may decide to put an "antic disposition" on and fake madness after he sees the ghost in order to hide his intentions to avenge his father's death. Hamlet may feel it necessary to take extreme measures to hide the way he feels.
And yet, if you study Hamlet's insane act carefully, you will find that the act itself is not entirely convincing. He does little more than wittily and sarcastically reply to those around him--an act that only makes Claudius more suspicious. He has open disdain for Polonius; he reacts with anger and insults to the spying Rosencrantz and Guildenstern. In other words, he is not one to feign how he feels toward others, even when he is acting-- or trying to act.
How does this discussion relate to Ophelia? I don't think Hamlet is one to deceive or mislead. His love letters to Ophelia are eloquent in their simplicity. It is Polonius and Laertes who doubt Hamlet's sincere love toward Ophelia, and they underestimate both Ophelia and her relationship to Hamlet. Polonius reasons that all young men are deceivers of women, and Laertes reasons that Hamlet's "will is not his own," and that his marriage will be a political one. Both are wrong in hindsight. Gertrude, for instance, at Ophelia's grave expressed her wish that she might have been Hamlet's wife. Evidently, she thought that Ophelia was a suitable marriage partner for Hamlet. Clearly, Hamlet was serious about Ophelia.
His reactions to her throughout the play are those of a hurt and rejected lover. Remember that she broke off the relationship with him first. His anger toward her reveal his pain. At her death, Hamlet is inconsolate, but afterwards, he is able to obtain a maturity as well as a fatalism that he has not had before.
Hamlet loved Ophelia deeply. He cannot express his love to her--not because of his unwillingness to do so, but because her siding with her father who is Claudius' ally prevents him from attempting to mend this relationship. There is nothing Hamlet can do when Ophelia willingly takes part in a plot to spy on Hamlet and turns over his love letters to her father. What we see throughout the play is the suffering of two young people who if not for the failures of their elders would have had a chance at happiness together.
I would say that Hamlet does love Ophelia. I would also say that she loves him. In the end, I think that what ends up dooming their relationship and one another is that neither has the emotional strength to confess or speak this love to the other. I think that this becomes one of the most dominant themes of the play. In analyzing how one's function can be smothered by surmise, one sees this destructive tendency in the realm of love. Both characters love one another, yet cannot bring one another to articulate this love. They cannot clearly make a commitment to one another and speak of their feelings. Rather, they operate under this "screen" of love, one that filters actions and sentiments through the veil of a lack of transparency. I think that there might be a level of toying with Ophelia, but only when Hamlet is convinced that this screen, this veil, is reality. In a prime example of his function being smothered by surmise, Hamlet functions with the lack of emotional strength needed to confess one's love to another, to risk rejection, to be able to speak a condition that is more independent than dependent. In some senses, Shakespeare might be saying that to love someone is not "really about them," but rather about the individual who experiences the feeling. Despite Hamlet's protests about being free and being independent, his failure to confess his love to Ophelia reflects the pinnacle of weakness and dependence.
After the question about Hamlet's madness, this is one of the most asked question about the play. It does seem that Hamlet loved Ophelia, though a case can certainly be made for the other position.
Ophelia seems to be wise and witty (as seen in her conversation with Laertes), so she would probably be appealing to Hamlet. She has tokens, including letters, from him and he does attempt to distance her (protect her) from his "madness." His need to exact revenge supercedes his love, at least for a time.
Their most famous (and perhaps most ambiguous) scene is in front of Claudius and Polonius. Hamlet says, "I did love you once." Ophelia's response is "Indeed, my lord, you made me believe so." Hamlet has probably discerned that they're beeing watched and answers, "You should not have believed me..../I loved you not." He then begs her to leave, to go to a nunnery, because he knows what may be ahead for both of them.
The most convincing evidence of his love for her is his reaction to her death. Hamlet is visibly distraught and nearly inconsolable. He declares to Laertes, "I loved Ophelia. Forty thousand brothers/Could not with all their quantity of love/Make up my sum." He gains nothing if this is an act; it does seem as if his grief is evidence of his love.
Perhaps Hamlet was toying with her, as both Polonius and Laertes suggest; however, it seems likely he did care for her more deeply than some passing fancy might suggest. In his fashion, Hamlet probably loved her.