Kevin Feige confirms during the Marvel Studios fan and media event at Los Angeles last week, Loki will definitely back for Thor: Ragnarok even if it was to be anticipated given how the Loki concluded with Dark World taking the Throne of Asgard.
Why Thor went back to Asgard during and after Agen of Ultron, that is what fans have to find out in the much bigger concern about Loki's role in Phase 3 is just about what he wants. His actions points to the desire to rule Asgard and his jealousy of his brother, Thor. He attacked Earth using the Chitauri army and with the help of Thanos in The Avengers. Once again under the disguise of his adoptive father, Odin, Loki ended up having the throne of Asgard.
Although, it's not that easy, Loki is indebted to Thanos big time and Thanos always collects. The scepter that Loki used in The Avenger was in fact from Thanos, it is 1/6 of the Mind Gem or Infinity Stone and definitely Thanos will ask something for return. Being in charge and lead Asgard, Thanos need the entire golden gauntlet that houses them and gems. One of the gems is the Space Gem or the Tesseract which are on Asgard, in Odin's Vault. Definitely, Thanos may be leading to the realm to collect.
Here's a possible spoiler and twist, the Asgardian guard Heimdall, Idris Elba in the Thor films, disclosed that he has a scene in the Age of Ultron, with Loki and Thor. This was what Feige telling he fans about during the podcast with Screenrant.com last week, about Thor in the Age of Ultron, "picks up right where we leave [Thor] in Avengers 2." Although, Loki would not be appearing in The Avenger 2: Age of Ultron, either Marvel will keep it a secret or there will be a change of plans after The Avengers 2.