WARNING: A looooong answer ahead!

Normally, I'd say it’s a waste of time, or even completely morally warped, to discuss whether a child is good or evil, but given that it’s Snape, I'll try to portray him according to the books.

People take this as the evidence of child Snape being racist:

“The brief pause before he told Lily it does not matter if she’s Muggle-born.”

Awful, I know! I read him as being hesitant to answer, because he does not know the answer, or because he is worried about being a half-blood himself. He is not even aware of the Slytherin blood-bias, since he wants Lily to be in the same house as him, so let’s move on.

Some say that him hitting Petunia with a branch shows inherent cruelty.

That was a 10 year old’s act of accidental magic against someone who had just insulted his poverty for the second time at least, so unless Harry is inherently violent for inflating his aunt at 13 because she insulted his parents, that is meaningless.

There is also this:

“So she’s my sister!
“She’s only a —”

Maybe he was going to say “she’s only a jealous cow.” Whatever he was going to say about Petunia (but didn't), it was called-for: Petunia had just insulted Lily and Severus for being wizards, why wouldn’t he say she is only a Muggle?

Finally, calling a child evil/racist because of a few insignificant incidents is ridiculous and DEHUMANIZING.

Snape has been primed for grooming, and has been groomed from the moment he was Sorted.

He has every reason to hate Muggles by the time he arrives at Hogwarts, his dad(who was a muggle) is abusive toward him and his witch mom, and Petunia mocks his poverty multiple times.

Also, the fact that Petunia knows his family by reputation suggests that the Snapes were viewed negatively by a larger part of the town, and likely Severus had to deal with the consequences of his family being considered “white trash”. So, very likely he was bullied by other Muggle kids.

Evidence of domestic abuse:

During Harry’s Occlumency lessons, he sees this:

a hook-nosed man was shouting at a cowering woman, while a small dark-haired boy cried in a corner…

Cower: to shrink away or crouch especially for shelter from something that menaces, domineers, or dismays.

No one seems to care that he is crying, which shows neglect, at least.

In The Prince’s Tale, we see this:

His black hair was overlong and his clothes were so mismatched that it looked deliberate: too short jeans, a shabby, overlarge coat that might have belonged to a grown man, an odd smocklike shirt.

Again, poverty and neglect. He is clearly ashamed of what’s under the coat, because:

Harry wondered why he did not take off the ridiculously large coat, unless it was because he did not want to reveal the smock beneath it.

There is also this:

“How are things at your house?” Lily asked.
A little crease appeared between his eyes.
“Fine,” he said.
“They’re not arguing anymore?”
“Oh yes, they’re arguing,” said Snape. He picked up a fistful of leaves and began tearing them apart, apparently unaware of what he was doing. “But it won’t be that long and I’ll be gone.”
“Doesn’t your dad like magic?”
“He doesn’t like anything, much,” said Snape.

This confirms that Snape’s dad doesn’t like him or his mom, and that Snape’s only hope is that soon he’ll be out of there. Also, he calls a man shouting at a cowering woman “arguing” and this is his version of “fine”.

Harry describes Snape as being very obviously not well-cared for or adored:

slight, black-haired like Snape, but with that indefinable air of having been well-cared-for, even adored, that Snape so conspicuously lacked.

Physical abuse is implied by Snape’s mother’s cowering, the fact that Snape appears to always be wearing a long coat. This could be “just” his shame at his clothes, but long sleeves in the summer are a pretty classic sign of physical abuse. Adult Snape's relative indifference to physical pain (Fluffy bites him, he's knocked out, Harry casts a stinging hex) is another hint (you can't accuse him of being stoic about other things). It’s also confirmed to horrific effect by Pottermore:

It was also an accurate description of the desperately lonely and unhappy childhood he had with a harsh father who didn’t hold back when it came to the whip.

Then there is this,

Petunia was breathless, alarmed at being caught. Harry could see her struggling for something hurtful to say.
“What is that you’re wearing, anyway?” she said, pointing at Snape’s chest. “Your mum’s blouse?”

She wants to hurt him, so she’s pointing out that he is so poor he is wearing his mother’s clothes.

And:

“That’s where you’re going,” said Petunia with relish. “A special school for freaks. You and that Snape boy . . . weirdos, that’s what you two are.

...

“That boy found it! You and that boy have been sneaking in my room!

She refuses to use his name, he's so low. That’s all the Muggles we know young Snape interacted with - Tobias and Petunia.

Why would Snape like Muggles? The Muggle world has been cruel to him. Sadly, Gryffindors (James and Sirius) start antagonizing Snape as soon as they lay their eyes on him, and never stop (including attempted murder and sexual assault, covered up and enabled by the leader of the Order of the Phoenix). So we see that he was pushed away from the “good side” by everyone, except Lily.

Look who is being kind:

Harry walked with him to the stool, watched him place the hat upon his head. “Slytherin!” cried the Sorting Hat. And Severus Snape moved off to the other side of the Hall, away from Lily, to where the Slytherins were cheering him, to where Lucius Malfoy, a prefect badge gleaming upon his chest, patted Snape on the back as he sat down beside him.”

The Slytherins are cheering, and Lucius takes this 11 year old with a clear Muggle last name and who definitely looks poor under his wing immediately. The grooming begins.

It’s not a secret that Snape and Lucius were close at school, otherwise, what’s this about?

“Tell me (Sirius), how is Lucius Malfoy these days? I expect he’s delighted his lapdog’s working at Hogwarts, isn’t he?”

I view this as Lucius stepping in as a father/older brother figure, for someone who was desperate for it. It is clear that this relationship persisted throughout Snape’s life, and it looks like it was all in all a good one (but dishonest one, once Snape switched sides).

You also have to wonder just how cruel Sirius is being with this little comment. I am choosing to view Lucius’s relationship with Snape as a benign one.

At Hogwarts,Lily was the only good influence, he was being pulled in the other direction by everything and everyone else. It is kind of remarkable that he stayed friends with her, and would have continued to be friends with her, despite sharing a dorm with people who must have had issues with it.

An incredibly magically powerful teenager with a grudge against Dumbledore (for the way he handled the werewolf “prank”, i.e. forced Snape to cover up his own attempted murder, and did not punish the offender in any meaningful way), Gryffindors, and Muggles, who has everything to prove as an impoverished half-blood, might as well have “please recruit me to your cult!” written on his forehead.

This is how it works in real life. Cults, hate groups, gangs, etc., target the vulnerable, not the “evil.”

This is what JKR says about it:

Given his time over again he would not have become a Death Eater, but like many insecure, vulnerable people (like Wormtail) he craved membership of something big and powerful, something impressive.

She does not say he would not have given the Dark Lord the prophecy, she says he would not have joined at all.

His remorse is evident before we even find out he’d been a Death Eater:

“’Course Dumbledore trusts you,” growled Moody. “He’s a trusting man, isn’t he? Believes in second chances. But me — I say there are spots that don’t come off, Snape. Spots that never come off, d’you know what I mean?”
Snape suddenly did something very strange. He seized his left forearm convulsively with his right hand, as though something on it had hurt him.
Moody laughed. “Get back to bed, Snape.”
“You don’t have the authority to send me anywhere!” Snape hissed, letting go of his arm as though angry with himself.

Wait, but wasn’t he obsessed with the Dark Arts?

Here is Sirius:

”Snape’s always been fascinated by the Dark Arts, he was famous for it at school. Slimy, oily, greasy-haired kid, he was,”

...

“Snape knew more curses when he arrived at school than half the kids in seventh year, and he was part of a gang of Slytherins who nearly all turned out to be Death Eaters.”

Snape was so famous for being fascinated by the Dark Arts, Sirius changes the subject to how ugly he was immediately. Yes, he must have been pretty scary with his greasy hair!

Now how did death eaters gang get Snape to join them?

I am assuming they promised him a future free of oppression by people like his Muggle dad, possibly a lucrative career; maybe revenge against those who had wronged him played into it. Snape being a half-blood and associated with a Muggle-born to a degree, it’s weird to think the Death Eaters tempted him by playing up the blood supremacy parts of it; they might have played it considerably down. In fact, it does not seem like it was a big part of the agenda during the First War at all. According to Hagrid:

“Now, yer mum an’ dad were as good a witch an’ wizard as I ever knew. Head boy an’ girl at Hogwarts in their day! Suppose the myst’ry is why You-Know-Who never tried to get ’em on his side before.”

This is confirmed by JKR:

It depends how you take defying, doesn't it. ...muggle-born Also, James and Lily turned him down, that was established in "Philosopher's Stone". He wanted them, and they wouldn't come over.

Voldemort was recruiting muggle-borns. Of course that does not mean he was not racist but not racist enough to exclude exceptionally talented people, like Lily - Slughorn (who was Tom's teacher and mentor!) was the exact same way. This is the environment Snape came of age in.

If Snape is so racist, how come the two people he hates the most (James and Sirius) are purebloods? How come nobody ever accuses him of racism, in real time or in retrospect, except Lily, who only finds his racism problematic when it’s directed at her, and who in fact, bothers to make excuses for him for years and is surprised that he sees something in Avery and Mulciber?

Finally, here is Dumbledore talking about why people associated themselves with the young Tom Riddle:

“As he moved up the school, he gathered about him a group of dedicated friends; [...] They were a motley collection; a mixture of the weak seeking protection, the ambitious seeking some shared glory, and the thuggish gravitating toward a leader who could show them more refined forms of cruelty. In other words, they were the forerunners of the Death Eaters, and indeed some of them became the first Death Eaters after leaving Hogwarts.”

Dumbledore himself recognizes that not all Death Eaters were thugs who were interested in flexing their muscles in more refined forms. In my view, Snape was a combination of the first two, until Lily was put in the crossfire, at which point he had forgone protection and glory.

It is clear that he did not join up because he was a huge racist, but because he wanted to be powerful, and because these people, Lucius in particular, accepted him (unlike the non-racists who hated him because he exists). JKR can actually write most of the time and with Snape, she has been very careful. She even said he joined partially to impress Lily, which I find a little odd considering that Lily's reasoning for ending the friendship, but it proves that the author did not think racist beliefs had anything to do with it. He became a Death Eater to gain power and influence, after 7 years of grooming by the bad guys and abuse by the good guys. This was fueled by very understandable hatred for Muggles.

Death Eater Snape was a “softie”

There is substantial evidence that he was never particularly violent as a Death Eater. The only thing that indicates he was ever important in the First War was that he has the Dark Mark.

What does the Dark Mark mean? I argue that it means nothing. If anybody finds any proof that only high-rankers have it and that the only way to get it is to do something awful, and by proof I do not mean Harry Potter's speculations, please let me know.

Pettigrew has it, and he’s a joke. Nobody respects him.
Fudge doesn’t believe it means anything when Snape shows it to him (which is, by the way, flagrant betrayal of the Dark Lord after he has definitely returned!)
16 year old Draco, who hasn’t done anything yet, has it.
Conversely, Sirius doesn't have it and everyone believed him to be a high ranker Death Eater, anyway.
Snape might have got it after he defected, and so anything he might have done to earn it was done in his capacity as spy .
Snape almost certainly never killed anyone:

When Dumbledore asks Snape to kill him instead of Draco:

“If you don’t mind dying,” said Snape roughly, “why not let Draco do it?”
“That boy’s soul is not yet so damaged,” said Dumbledore. “I would not have it ripped apart on my account.”
“And my soul, Dumbledore? Mine?”
“You alone know whether it will harm your soul to help an old man avoid pain and humiliation,” said Dumbledore.

Snape and Dumbledore both know Snape’s soul is not harmed.

When Snape finds out Harry must die:

Dumbledore opened his eyes. Snape looked horrified.
“You have kept him alive so that he can die at the right moment?”
“Don’t be shocked, Severus. How many men and women have you watched die?”
“Lately, only those whom I could not save,” said Snape.

Snape is horrified at the thought of Harry dying. Dumbledore only accuses him of watching people die, not of killing anyone, and does not argue with Snape when Snape takes credit for saving as many lives as he could, lately.

It is clear that Snape finds even the task of euthanizing Dumbledore incredibly distasteful, to say the least. This is after he has taken the Unbreakable Vow to kill Dumbledore:

“After you have killed me, Severus —”
“You refuse to tell me everything, yet you expect that small service of me!” snarled Snape, and real anger flared in the thin face now. “You take a great deal for granted, Dumbledore! Perhaps I have changed my mind!”

So Snape is still not sure he can do it? Despite this meaning he will die?

”There will come a time — after my death — do not argue, do not interrupt!”

Dumbledore is expecting Snape to have yet another hissy fit about it.

Either Snape has killed before, but now regrets this so much he does not want to do it ever again, or more likely, Dumbleore is his first and last kill. It is very clear that the hatred and revulsion on his face when he does it are at himself.

Snape’s one accomplishment as Death Eater that we know of is getting half a prophecy; maybe this is what he was marked for. It also led him to defect and turn spy, and amazingly, it also led to Lord Voldemort’s downfall.

Now people say that, he only defected for Lily, he would have been fine with Neville dying!

We do not even have proof that Snape knew it could be Neville.

Does the prophecy, especially the bit Snape heard, obviously mean a baby? Or is it only obvious to us now that we know how it turned out?

“THE ONE WITH THE POWER TO VANQUISH THE DARK LORD APPROACHES... BORN TO THOSE WHO HAVE THRICE DEFIED HIM, BORN AS THE SEVENTH MONTH DIES...

“Approaches” is a weird way to say “about to be born”. It could mean he was already born and he is coming from afar, or something.

Snape could not have guessed that Voldemort will decide that “killing a baby and its entire family” is the best course of action. Positioning yourself as your equal’s enemy does not necessarily make strategic sense.

But whatever; Lily was put in the crossfire. Snape then goes to Dumbledore in person, despite expecting Dumbledore to kill him. That was not the obvious course of action to get a warning to Lily. Snape could have owled Lily, given Dumbledore an anonymous tip, or… something. Him asking to meet with Dumbledore face to face might indicate that Voldemort’s interpretation of the prophecy was not the only reason Snape defected but rather the last straw. Of course, this is speculation.

Could he have defected earlier? Not without risking his own life.

Sirius again, about Regulus:

From what I found out after he died, he got in so far, then panicked about what he was being asked to do and tried to back out. Well, you don’t just hand in your resignation to Voldemort. It’s a lifetime of service or death.

Lord Voldemort, about defectors:

And here we have six missing Death Eaters… three dead in my service. One, too cowardly to return… he will pay. One, who I believe has left me forever… he will be killed, of course.

Amusingly, he is talking about Snape, here. Karkaroff, the “too cowardly” one? He also dies:

“And they’ve found Igor Karkaroff’s body in a shack up north. The Dark Mark had been set over it — well, frankly, I’m surprised he stayed alive for even a year after deserting the Death Eaters; Sirius’s brother, Regulus, only managed a few days as far as I can remember.”

Snape not defecting for Neville’s sake does not prove that he was OK with Neville dying. It only proves that he was not willing to risk his life to prevent it (it does not even prove that, strictly speaking, because we do not know what would have happened if Voldemort had gone after Neville, but yes, OK, realistically, he would not have done anything for Neville). He cares more about Lily than about other people, at the point of defecting, that much is obvious, but not risking your life does not imply indifference to others' lives.

Oh, he was playing both sides!

This one is one of my favorite arguments, it’s just so stupid, you gotta love it.

Snape did not know he will be Dumbledore’s killer before the summer between OOTP and HBP. By this point he had already risked himself to protect Harry multiple times. When Dumbledore summoned Snape after he had gotten himself nearly killed, Snape could have simply done nothing and take credit for finishing Dumbledore then. When he did find out he’ll have to kill Dumbledore, he did not want to do it. But even if this was somehow part of some grand scheme, he was only playing both sides from the moment he killed Dumbledore.

Except even this is ridiculous.

A) Why send Harry the Silver Doe and lead him to the real sword of Gryffindor?

He could have simply done… nothing.

B) Why follow Dumbledore’s plan? In case you’ve forgotten, Dumbledore’s plan was as follows:

There will come a time when Lord Voldemort will seem to fear for the life of his snake.”
“For Nagini?” Snape looked astonished.
“Precisely. If there comes a time when Lord Voldemort stops sending that snake forth to do his bidding, but keeps it safe beside him under magical protection, then, I think, it will be safe to tell Harry.”

...

“So the boy . . . the boy must die?” asked Snape quite calmly.
“And Voldemort himself must do it, Severus. That is essential.”

Snape prevents others from killing Harry:

*“No!” roared Snape’s voice and the pain stopped as suddenly as it had started; *Harry lay curled on the dark grass, clutching his wand and panting; somewhere overhead Snape was shouting, “Have you forgotten our orders? Potter belongs to the Dark Lord — we are to leave him! Go! Go!”

Snape must have fed Voldemort that line, or at least manipulated Voldemort’s arrogance so that he’ll continue to insist on killing Harry himself, even though he is the one person who cannot kill Harry. Preventing them from torturing Harry was just a cover-blowing moment, though.

Voldemort himself:

“I must be the one to kill Harry Potter, and I shall be.”

Snape follows Dumbledore’s plan exactly:

“I have thought long and hard, Severus. . . . Do you know why I have called you back from the battle?”And for a moment Harry saw Snape’s profile: *His eyes were fixed upon the coiling snake in its enchanted cage.*“No, my Lord, but I beg you will let me return. Let me find Potter.”

He also did not tell Voldemort that he is not the master of the Elder Wand; we know how that worked out for him (not very well).

The sum total of actual violence Snape commits on-page is:

1. Hitting Petunia with a branch at 9 or 10 in response to being mocked.

2. Inflicting a gash on James in self defense, which does not slow James down at all.

3. Pulling Harry out of the Pensieve and nearly hitting him with a jar (I say he missed on purpose). Also, completely justified.

4. Blasting Wormtail (one of his bullies and the person who betrayed Lily!) away from the door in HBP.

5. Magic-slapping Harry on the face, knocking him to the ground after Harry shouts: "kill me like you killed him, you coward". He is punishing Harry for being suicidal, not for the word "coward". Harry calls him a coward earlier in the same interaction and Snape only reacts by going off about James again. Again, completely justified.

6. I guess attempting to cast Sectumsempra on a Death Eater in the 7 Potters Battle also counts?

Snape is verbally aggressive, but extremely averse to violence. His sacrifices for the good side were innumerable.

harry potter, severus snape, and lily potter image

P. S. I promise, I didn't cry writing this answer.

Edit: Lucie Foselle asked to discuss some arguments, so I've tried to answer them in this edit.

Snape's leaning towards dark arts

People say he was "obsessed" with the dark arts but I know kids when I was at school would say people were going to be murderers and shit because they liked swords or guns. They are all only kids so seeing another kid really into a class and like doing it they always go for the extreme. When in reality they enjoy the subject and feel more as if it's a passion for them.

He created dangerous spell like “sectumsempra”?

Lets start with the first spells in the half-blood book, langlock, a jinx that basically stops you from talking, muffiato, a spell that made other people unable to hear what you say, and that was also used a lot by Harry and Hermione and a toenail-growing hex.

See something interesting about them? they are all defensive spells, langlock is the least violent way to stop a wizard who doesnt know nonverbal spells, like a fifth-grade student, muffiato is only useful to make oneself less noticiable and the toenail hex is kinda useless except if you are trying to make someone fall while they are running, which also makes it great if you are trying to outrun them.

The exception to the rule is sectumsempra, a curse that creates an invicible sword whose cuts cant be healed normally, will never stop bleeding and if it cut a body part then there is no magic capable of grow it back, it is not only cruel and excessive against the average wizard, it is also rather illegal for a 15 year old, it is also, if my memory doesnt fail me, on the last pages of the half blood book, probably after the shrieking shack prank.

It is shown in the prisoner of azkaban that Snape is still either afraid or paranoid of werewolf lupin (how he waited until he finished the anti-werewolf potion to go) and is still very bitter about it, he also thought his entire life that not only was Sirius but also James and Remus in the joke, we know that is false but he can still be irrational when angry, so from his point of view* the marauders tried to kill him*, Dumbludore knows but doesn't care, he cant tell anyone and even if he told someone they may take their side.

what option does he has besides finding a way to defend himself when they try to kill him again?

Werewolves are resistant to magic, so he needs a strong curse, they move a lot and are really fast, so if cut they would quickly bleed to dead, they seem to be able to regenerate since they constantly damage themselves, so the curse must be uncurable too, also you dont want them to bite you so a spell that creates a invisible sword from a distance seems perfect to keep some distance between you and the giant death machine.

I am not saying it was a good idea to create the spell, he really wast in any more mortal danger, but for someone as paranoid as Snape it makes perfect sense as a backup plan.