Loki is one of the most charismatic and memorable villains in the Marvel Cinematic Universe, and actor Tom Hiddleston was recently asked why the character didn't show up at all during Avengers: Age of Ultron. The answer is actually pretty interesting, and you can watch Hiddleston explain above.
In short: Hiddleston was filmed as Loki for a single day so the character could show up during Thor's dream sequence, but there was some fear that audiences would think this indicated that Loki was, in fact, in control of Ultron.
Since Ultron was always planned to be the "big bad" of that film, and the idea that the AI was a literal puppet of Loki would have diminished its impact as a frightening mastermind.
Loki's scene was cut, I'm sure Hiddleston still got paid, and a minor mystery has been solved.