She might be shocked at first. Since Harry is yelling, which is out of character for him in many cases, Lily could be taken aback and not know how to respond immediately.
Harry might become more determined to prove Snape wrong. He's a stubborn character, and Snape's yelling could fuel his desire to show that he's not the misbehaving student Snape seems to think he is.
Perhaps it's related to Harry's association with his father, James Potter. Snape had a long - standing grudge against James, and seeing Harry might bring back those bitter memories. So, whenever Harry does something that reminds Snape of James, like being overly confident or a bit of a troublemaker, he yells at him.
At first, it might strain their friendship. Harry could feel hurt and misunderstood, leading to some distance between them. He might avoid Hermione for a while, not wanting to face her anger.
One possible reason could be that Harry did something reckless without consulting Hermione. For example, if he went off on his own to face a dark wizard, Hermione, being the cautious and logical one, would be furious. She values planning and teamwork, and Harry's solo actions might seem to her as endangering himself and others needlessly.
In a fanfic, it could be a scenario where Tonks has been secretly admiring Harry for his bravery. One day, Harry accomplishes something really great and Tonks, overjoyed, yells'mine' in a sense of pride, like he's part of her group of heroic people she admires, and hugs him tightly. For example, when Harry manages to defeat a powerful dark wizard on his own.
One great fanfic could be 'Harry and Lily's Enchanted Bond'. In this story, Lily, being a fairy, might use her magical fairy abilities to help Harry in his adventures at Hogwarts. It could add a whole new dimension to the wizarding world as we know it.
In some fanfics, it could be due to a threat she believes she can't protect Harry from. Maybe she thinks that by leaving him, the dark forces won't target him as much.
Perhaps Sirius Black could also be involved. Sirius was Harry's godfather and was very much a part of Harry's life. His presence could add some interesting dynamics, like he could be the one who stumbles upon the magic that makes the meeting possible and then has to deal with the implications of Harry meeting his mother.
In a fanfic, Harry could be developed by showing how he copes with having his mother back in his life. He might have mixed feelings of joy and confusion. Lily could be developed by depicting her reaction to the modern wizarding world that Harry is a part of. She could be both amazed and a bit critical of some of the changes. This would give depth to their characters as they interact and adapt to each other.