He probably did something extremely fanastically awesomeliciously sweet. (: I mean, if a boy I absolutely hated, say, gave me a copy of Harry Potter and the Deathly Hallows signed سے طرف کی JK Rowling and took me to the premiere of DHPart I the Movie, I'd probably fall in love with him, too. (:
I think that she didn´t really hate him... I think that she had already fall in love with James, but was too ashamed to say the truth. Happens all the time, specially because James was a trouble-maker and she was a good girl.
I think deep down, Lili had a crush on James. After Snape called her a mudblood and James defended her, i think she found it kind of sweet, and supposedly he stopped attacking people at random times the اگلے year, that's when she let herself fall ni love.
He began acting like less of a bullying jerk in their final year, and realised that his دکھانا off behaviour wasn't impressing her like he wanted it to. So she gave him a chance, and she fell in love with him.