Wouldn’t Snape have known that Lily and James being friends with Wormtail would lead to disaster if Wormtail wanted to endear himself to Voldemort (which he did, of course)?
Part of the answer to this question in particular comes down to whether or not you believe Snape knew about Wormtail’s allegiance to the Death Eaters. If you choose to believe that he did not know, you can see some of the other answers here. I am going to dedicate this answer to defending the case that Snape did indeed know, and try my best to explain why I think Snape might not have known that the Wormtail’s double-agent role would have led to disaster.
First, as evidence that Snape knew that Wormtail was a Death Eater, I present a quote from the chapter The Servant of Lord Voldemort in Prisoner of Azkaban:
“You haven’t been hiding from me for twelve years,” said Black. “You’ve been hiding from Voldemort’s old supporters. I heard things in Azkaban, Peter. … They all think you’re dead, or you’d have to answer to them. … I’ve heard them screaming all sorts of things in their sleep. Sounds like they think the double-crosser double-crossed them. Voldemort went to the Potters’ on your information … and Voldemort met his downfall there. And not all Voldemort’s supporters ended up in Azkaban, did they? There are still plenty out here, biding their time, pretending they’ve seen the error of their ways. … If they ever got wind that you were still alive, Peter - “
Here, Sirius gives us undeniable proof that at least some, if not all Death Eaters were aware that Peter was a Death Eater. I think it’s perfectly reasonable to assume Snape knew as well.
We also know from Sirius (later in that chapter) that Wormtail was passing information to Voldemort for one year prior to the Potters’ deaths. It is unclear whether or not he was a Death Eater for all that time, but since he has a tattoo, he would have had to become one before Voldemort fell, but not necessarily before he became secret keeper (There was “barely a week” in between).
I don’t think Wormtail was seen as threatening to anybody, including Snape. Lupin thought Black was the traitor, presumably because of his family’s heritage. Black thought Lupin was the traitor, presumably because he was a werewolf. Nobody gave Wormtail a second thought. Snape may have known Wormtail was a Death Eater, but given the importance of the information Wormtail was relaying to Voldemort, Voldemort may have chosen to receive Wormtail’s information in private.
But even if Snape had known that Wormtail could have posed a threat to Lily, was he going to act on that and kill one of his fellow Death Eaters before Voldemort solidified his choice to Harry. Voldemort might not have liked that Snape kill his informant. Snape was most likely in a very high strung position. There is a chance Lily can survive if Voldemort chooses Neville, and if he kills Wormtail before that, what might Voldemort do to him? It is a tight spot to be in.
Regardless, Snape doesn’t find out that Lily is the target until Voldemort chooses between Harry and Neville, at which point, he immediately tells Dumbledore to protect them (as a last resort, because only Dumbledore can stop Voldemort in his mind), and then Wormtail is made secret keeper (unbeknownst to anyone but Sirius and James). Barely a week later, Wormtail tells Voldemort, and Snape is powerless to stop him at that point. Snape is also powerless to stop Voldemort once the decision to kill Lily has been made, because he doesn’t know Wormtail is the secret keeper.
Dumbledore doesn’t tell Snape how he’s going to protect the Potters (Snape is still a Death Eater), so Snape has no reason to tell Dumbledore that it was Wormtail. Once she dies, and Snape becomes a spy, there’s no reason for him to reveal Sirius’ innocence. He loathes Sirius. I kind of got the feeling Snape knew in the Shrieking Shack because I think he was listening in on the conversation for a little while before he entered the room. (The time between when they heard the noise, and when he actually enters) The two are meanwhile explaining there innocence, and Snape refuses to acknowledge them. He just wants both of them out of the way. I don’t think Snape was thick enough to not believe them.