Sympathy for Hamlet and Ophelia is created in a few ways in this scene. First of all, Ophelia is painted as a young, naive girl who is uncertain in the area of love. She tells her brother and father that she doesn't know what to think of the attention Hamlet has been giving her, but at the same time she defends Hamlet fully believing that he has been honorable in all his advances.
Add to this the fact that both Laertes and Polonius fear that Hamlet's only goal is to get Ophelia to go to bed with him. They tell Ophelia that all of Hamlet's advances, words, etc. are not love. Laertes says they are false; Polonius says they are dirt. The audience sympathizes with Ophelia because her young, naive hopes are dashed by her brother and father. Laertes gives his advice in a loving, brotherly way, but Polonius acts as the commanding father who only cares about his own reputation.
Finally, the audience can sympathize because Laertes points out that even if Hamlet's love were real, Ophelia and Hamlet could never be married because Hamlet is the Prince, and he will never marry below his station in life. His bride will be chosen by his royal parents. This bit of information sets up the 'forbidden love' scenario that is also seen in Romeo and Juliet.