If you follow Marvel’s Cinematic Universe or read their Thor comics, you likely think of Loki as being unquestionably one of the bad guys (and occasionally an antihero). And you would be correct about Marvel-Loki.
But how did the Norse view the God of Mischief? Was Loki on Team Good or Evil?
The short answer is “yes”.
In typical trickster figure fashion, Loki’s allegiances aren’t as clear-cut as the rest of the Norse pantheon is.
It’s complicated, as they say on Facebook.
You see, with most deities, their allegiances were relatively static; if they were on Team Good Guys at the beginning of things, they stayed on that team until the end. Not so with Loki. Being a Trickster allowed him more leeway on what was acceptable for him to do.
We don’t know much about Loki’s early days, but based on the fact that he fathered three beings known as Loki’s Monstrous Children (who are major antagonists in the final battle at the end of our* universe), it is generally understood that Loki started out as a bad guy.
^ The Children of Loki by Willy Pogany (Featuring Loki's Monstrous Children)
Sometime very shortly after, however, he became BFFs with Odin, and was solidly on Team Good. He helped get Asgard’s defences built for free by tricking a giant into doing the work (Gylfaginning, Chapter XLII). He turned himself (herself?) into a mare and gave birth to Odin’s eight-legged horse, Sleipnir (also in the previously mentioned chapter of Gylfaginning). He helped Thor regain his hammer when it was stolen by Thrym, king of the Frost Giants (The Lay of Thrym). He was on Team Thor during a skills competition in Útgarðr (Gylfaginning yet again, this time Chapter XLIV). In tale after tale, Loki is depicted as Thor and Odin's loyal companion.
For the majority of our universe’s existence, Loki had Odin’s back 100%. Then came the day where Loki became jealous of the attention Odin’s son Baldr was getting, and through trickery, caused the death of his nephew (which is the catalyst for the end of our universe) swinging Loki’s allegiance back to the Dark Side.
In short, Loki’s bad at the edges and good in the middle; mostly good but with some bad mixed in to keep things interesting.
* We say our universe rather than the universe because, according to Norse belief, a universe’s existence is cyclical rather than linear – when one universe ends, another begins, rising out of the ashes of its predecessor. As such, there was a universe before ours and there will be another when this universe ends. The first beings in our universe were believed to be the survivors of the end of the previous universe, just as some survivors of the final battle will be the first beings of the next universe.