The Avengers is already received loads of praise and has taken over the foreign box office with ticket sales. Making a movie of this scope was seen as a risk with the large cast and demand that audiences be willing to accept a team of superpowered heroes fighting the forces of evil. It helped to have several of the Marvel characters appearing in other movies before this to make audiences familiar with pretty much the entire cast.
Assembling a team of heroes like this requires the perfect threat. Over the years of publication in Marvel Comics, the Avengers have faced several villains. The filmmakers could have chosen from the likes of the Skrulls, Ultron, Kang the Conquerer or the Masters of Evil. Instead they went with the logical choice from both the comic and cinematic universes, Loki.
There are no spoilers contained below.== TEASER ==
In the comics, it was Loki that unintentionally brought the team together. In a plan to get Thor to get his attention, he created an illusion that caused Hulk to attack a train. Other heroes, including Thor and Iron Man, gathered to deal with Hulk and soon learned that Loki was behind the entire fiasco. At the end of the battle, they realized that teaming up would give them an advantage over the bigger threats that might arise. This was the birth of the Avengers.
In the movie, the formation of the team is a little different. We've seen Nick Fury and Agent Coulson mentioning the 'Avengers Initiative' to the various heroes. With the tesseract (Cosmic Cube) from Captain America: The First Avenger, and Loki's appearance at the end of Thor, the seeds have been planted for his return and diabolical schemes to be unleashed upon the world.
From a filmmaker's perspective, choosing the villain could be a tricky decision. Those of us that read comics would have very little problems even if Kang appeared in his green and purple outfit complete with thigh high boots. Those that don't read comics might have a harder time accepting the absurd-looking character in live-action form on the big screen.
Loki has already been established as a character and as a villain. Thor may have required audiences to accept the mystical nature of certain comic book characters but based on the success of the execution in that movie, it makes it that much easier for his return in The Avengers.
There's also the advantage that Loki doesn't really have to be introduced to audiences. They should have an idea who he is, even if they missed seeing Thor. Bringing in a completely new villain would require time for an introduction. The movie already has to spend time with the team members getting together. Adding in the origin of a villain meant to be the center of the threat the team would face would take too much screen time.
Of course, Loki wasn't the only villain available. Because all the Marvel Studios movies are tied together, we could have had Red Skull, Whiplash, Justin Hammer, Abomination as the villain. We could have also had villains from Iron Man, Captain America or Hulk's history pop up. Loki just makes the most sense. Some of the other villains listed above are worthy but Loki has a certain amount of regal charm that makes him perfect for taking on the heroes.
It might have seemed as if using Loki was taking the easy way out since he was already established but given his history with the formation of the team in the comics and the scope of what he's capable of, he was the best choice to be used as the first villain in the cinematic universe.