One possible reason could be remorse. Harry might realize that he misjudged Snape all along. Snape had a complex role, and if Harry discovers the truth about Snape's true loyalties and sacrifices, it could lead to him crying out of guilt for how he treated Snape in the past.
Well, it could be due to the stress of their relationship. Harry had a lot on his plate, being the hero and all. Ginny was also a strong - willed witch with her own ideas. They might have had an argument about their future together. For example, Harry might be worried about Ginny's safety if they stayed together, given his dangerous life. Ginny, on the other hand, could be frustrated that Harry was trying to push her away for her own good. Another possibility is that they could be crying over the state of the wizarding world. After all the destruction caused by the war, seeing their beloved Hogwarts in ruins or the wizarding community divided could be heart - breaking for them.
Isolation. Snape is a lonely character. He doesn't have many friends, and he is constantly in a difficult position between the Death Eaters and the Order of the Phoenix. His feeling of being alone and not being fully understood by anyone can lead to crying in fanfiction.
Perhaps she's being bullied. In the wizarding world, there could be other students who pick on her because she's a 'Mudblood'. This could be really distressing for Hermione, and when Snape finds her crying, he might be conflicted between his general dislike for Gryffindors and his sense of justice.
Snape might simply sit with Harry in silence for a while. Just his presence could be reassuring to Harry. After some time, Snape could start a conversation, asking Harry what is wrong in a more empathetic tone than usual. This gradual approach could help Harry calm down.
Well, it could be that he's feeling the weight of his destiny. Harry has so much on his shoulders, like fighting Voldemort. Maybe he just had a particularly tough encounter with the Dark Arts or lost someone dear in the fight against the dark side. Another reason might be his feeling of isolation. Despite having friends, there are times when he feels alone in his battle.
One possible scenario could be when Lupin has to leave Hogwarts due to his werewolf secret being revealed more widely. He might cry because he has found a sense of belonging there, with his friends and students. He loves teaching and seeing the young wizards grow, and leaving all that behind is heart - breaking for him.
One possible reason could be the pressure he faces from his family. The Malfoy family has high expectations and a dark reputation. Draco might feel suffocated by the need to uphold the family name and follow their dark path, which could lead to him breaking down and crying in the bathroom where he can be alone.
One possible reason could be copyright infringement. If the fanfiction uses too much of the original 'Harry Potter' material without proper authorization, J.K. Rowling (or those in charge of the franchise) might take legal action. Another reason could be if the fanfiction misrepresents the characters in a way that goes against the intended spirit of the original work.
Well, it could be for the sake of exploring an alternate reality. The Great Hall is a place full of magic and tradition in the 'Harry Potter' world. The writer might want to create a scenario where the usual boundaries between Harry and Snape are broken. It could also be a way to show a more complex side of their personalities. Maybe Snape has a side that is attracted to Harry's courage and Harry sees a different, more vulnerable side of Snape, leading to this kiss.
One possible reason could be that Harry is afraid of Snape's intimidating presence. Snape has always been strict and rather unfriendly towards Harry in the original series, so in the fanfiction, this fear might be amplified, causing Harry to run. Another reason could be that Harry has stumbled upon something he shouldn't have seen that involves Snape, and he's running to avoid getting caught.