Snape came from a loveless marriage. Hogwarts was his fantasy escape. However, from his first moment on the Hogwarts express, he is emotionally attacked by James Potter. His low self-esteem meets the reality that Hogwarts is no paradise. At the speech before the Sorting ceremony, Minerva McGonnigle tells the new students that their "House will be like their family". Hermione doesn't initially find this - possibly, neither does Severus. What he does experience is being attacked by James Potter and his friends (He later constantly refers to being attacked four against one). Where can he find allies, helpers and possibly friends - his house - Mulciber and Avery. Bad choice possibly, but Severus's immediate need is help and protection from James Potter and co. Moreover, James Potter NEVER ceases to bully Severus - Even Sirius Black admits this - "Because he exists". Is this any different from the Nazi or Deatheater attitude to Muggles?
In sum Snape becomes a deatheater because of James Potter and his bullying