In some fanfictions, it could be related to Lily. If James did something that Snape perceived as a threat to his relationship with Lily, even if it was just being overly affectionate with her in front of Snape, Snape might lash out at James. Snape had deep feelings for Lily, and any sign of James getting in the way could trigger an attack.
Another reason could be a matter of pride. Snape was a proud and intelligent wizard. If James had publicly humiliated Snape in front of their peers, perhaps by showing him up in a magical duel or in a classroom setting, Snape might attack James to regain his lost pride.
Perhaps Snape believes that James has some crucial information that he needs and he thinks torture is the quickest way to get it. Or maybe there's a power struggle going on. Snape wants to assert his dominance over James, who might be seen as a rival in some way, either for a position at Hogwarts or in the wizarding community. Also, it could be due to a misunderstanding that has spiraled out of control, leading Snape to think that James is a greater threat than he actually is.
Lily. Since Snape and Lily were friends when they were young, and James had a crush on Lily. Snape might have had a special connection with Lily that James desired, so he could be jealous. Also, Snape was always kind of an enigma, and that mystery around him might have made James jealous as well. He might have thought Snape had some sort of power or charm that he didn't.
One reason could be jealousy. Snape might be jealous of James' popularity and charm. James, on the other hand, could be jealous of Snape's close friendship with Lily in their early years. Another reason is their different personalities. James was outgoing and bold, while Snape was more introverted and brooding. Lily might be attracted to different aspects of each of them, which could lead to the fight as they both compete for her attention.
Perhaps in the fanfiction, James is seen as more accepting of Lily's friends and her social circle. Snape, on the other hand, might be associated with a darker crowd or have some beliefs that Lily doesn't agree with. For example, if Snape is too involved with the Dark Arts in the fanfiction, it could be a turn - off for Lily.
One reason could be that James finally realizes the extent of his bullying. In the original story, James often harassed Snape. In fanfiction, he might come to understand how much pain he caused Snape and feel genuine remorse. Another reason could be that he discovers new information about Snape that makes him see Snape in a different light. For example, he might find out about Snape's love for Lily and how his actions towards Snape affected Lily as well.
Differing ideologies during the wizarding war. If James was seen as a threat to Snape's side (even if Snape was on the wrong side, from a moral perspective), Snape could justify killing him. For example, if James was too aggressive in fighting the Death Eaters and Snape thought it would lead to more bloodshed, he might take matters into his own hands to stop James.
One possible theme could be redemption. Maybe James realizes the wrongs he did to Snape and the kiss is a sign of his attempt to make amends. Another theme could be a change in their relationship dynamics, from enemies to something more complex. For example, a sudden realization of a deeper connection.
The threat to his friends. James is very loyal to his friends, like Sirius, Remus, and Peter. If they were in danger or if something bad happened to them, it would be understandable for him to cry. For example, if one of them got seriously injured or was in a life - threatening situation, his emotions would be on full display.
It might be related to power dynamics. If in the fanfiction, James has a lot of power and misuses it in a way that affects Harry or those around him, Harry would hate him. For example, if James uses his influence to push through unfair rules or to marginalize certain groups that Harry supports. Also, if the fanfiction changes James's personality to be more self - centered and less empathetic, Harry would likely dislike him.
One reason could be jealousy. Maybe Snape gets jealous of Lily's other relationships or her popularity at Hogwarts. Another could be a fundamental difference in their beliefs or values that grows over time into hatred.