He'd been mocking those earrings earlier; with this gesture she shows him she isn't as materialistic as he accused her of being. John said that "you got everything and I got shit"; by giving him her earring she negates that accusation.
From the script:
Bender: Don't you ever...ever! Compare
yourself to me! Okay? You got
everything, and I got shit! Fuckin'
Rapunzel, right? School would
probably fucking shut down if you
didn't show up! "Queenie isn't
here!" I like those earrings Claire.
Claire: Shut up...
Bender: Are those real diamonds, Claire?
Claire: Shut up!
Bender: I bet they are...did you work, for the money
for those earrings?
Claire: Shut... Your mouth!
Bender: Or did your daddy buy those?
Claire: Shut up!
Bender: I bet he bought those for you! I bet those are a Christmas
gift! Right? You know what I got for Christmas this year? It was a
banner fuckin' year at the old Bender family! I got a carton of
cigarettes. The old man grabbed me and said "Hey! Smoke up Johnny!"
Okay, so go home'n cry to your daddy, don't cry here, okay?
There's more discussion here:
Rubystreak:
Claire gives John her diamond earring. Is that meaningful?
Moe:
I think so. It was symbolic of the breaking down of the artificial
wall of affluence she kept herself behind to protect her (in a
psycho-social sense, as opposed to physical) from the have-nots. In
that moment she realized that the connection she felt with John was
worth more than her material possessions, especially since she didn't
even "work for the money to pay for" them.
The whole movie is about the breaking down of artificial walls between
high school cliques - walls created by parents and the home
environment that they grew up in. They realize, if only for a day,
that underneath it all, they're really all the same and all deal with
the same issues.
Will it last? I'd like to think that at some level they'll all take
the insights from that day with them. I think all teenagers (or at
least introspective ones) have to practice a sort of doublethink where
they fully embrace their clique identities while also at some level
realizing the silliness of it all. But no doubt, come Monday morning,
they're all right back in their respective cliques.