What were his motivations? Was he jealous? Was it pure spite? Was he trying to teach the gods a lesson?
Why was it important for him to utilize an agent (Hodur) in the assassination?
Mythology & Folklore Stack Exchange is a question and answer site for enthusiasts and scholars of mythology and folklore. It only takes a minute to sign up.Sign up to join this community
The Prose Edda is unclear on this. All it tells us is that when Loki saw that Baldr could not be harmed,"he was not pleased". (Gylfaginning 49) In my own opinion, the way that Loki's three children by Angrboda: Hel, the World Serpent and the Fenris wolf were bound or cast out might have something to do with it. (Gylf. 34-5) They may be monsters, but to Loki they're his kids.
The why is largely a mystery, and depends a fair bit on exactly what you perceive Loki's general function to be (Jens Peter Schjødt seems to have considered Loki a sort of personification of fate, growing more and more adverse to the gods as their time progresses), but perhaps we can say something about the second part of the question.
First, we should note that Odin and Loki were foster brothers (Lokasenna, verse 9), i.e. had mixed their blood and thus were considered as brothers. This would have meant a strong taboo against bearing hand on any of the other's near kin, something we perhaps can still see when Loki is later punished: none of the gods directly injures him or his sons, instead transforming one to kill the other (though this might also be seen as poetic justice).
But perhaps you do not see Loki as one to be bothered with such things? If so, we can instead see the use of a proxy as a way to twist the knife even further: by letting Baldr be killed by another son of Odin, Loki was effectively preventing Odin from seeking direct justice, something that was deeply shameful. In Beowulf, king Hrethel had two sons, Herebeald and Hæthcyn, until Hæthcyn killed his older brother in an hunting accident. Since it was not possible for Hrethel to take revenge, he eventually died from grief and shame. Odin instead circumvented this by fathering a new son that could take revenge.
Margaret Clunies Ross' Prolonged echoes discusses this a fair bit, but she tries to fit this all in an overarching ideology of the stories that I find less than convincing. She does discuss the problem of seeking revenge within your own family.
Gro Steinsland in Fornnordisk religion tries to present several different interpretations, but most of them focuses on Baldr rather than Loki.