The line was spoken in the first Spider-man movie with Tobey Maguire. It was when Peter happened to run across Mary Jane on the streets of New York City after she ran out of her job as a waitress being yelled at by her boss.
She told Peter "don't tell Harry" because she was ashamed of not immediately succeeding as an actress. She even states that she's afraid of Harry finding out because her being a waitress would make her unworthy of being his girlfriend, in as many words.
The giddy laugh came in that scene after Peter says "Why don't I come by and grab lunch some evening?" They both laughed at his flub, but agree that it would be nice to see each other again.
As they're leaving, she turns to Peter and reminds him, "Don't tell Harry!" and continues to laugh at Peter for being the dork she always loved.
There was no nostalgia implied in the scene. It was never intended as a reference to anything in the comics. Mary Jane and Harry never had any sort of relationship other than friends. The reaction between the two characters were to Peter's awkwardness.
This mildly humorous scene was the likely source of the audience's amusement/laughter.