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 प्यार with him, too. (:
I think that she didn´t really hate him... I think that she had already fall in प्यार 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 बिना सोचे समझे times the अगला year, that's when she let herself fall ni love.
He began अभिनय 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 प्यार with him.