In a speaking appearance transcribed by Assignment X (via CBM), presumably the same appearance at which Whedon dished about The Wasp and The Avengers, the filmmaker discussed the character's death in The Avengers and his subsequent return in S.H.I.E.L.D.
“Marvel was very clear what they wanted to do and they knew it was going to be these guys,” said Whedon. “There were some questions about Hawkeye and [Black] Widow and can we pull that off. The guys who had their own franchises, there was no doubt. They wanted Loki and nobody else. They wanted an alien invasion in the third act. They wanted the heli-carrier attack. I had enough sign posts to build on, and all I had to do try to make it matter and try to have reasons for all the conflicts. The Thor and Iron Man fight, it really is that scene [where he] ‘tells the cop he can’t bust the guy because it’s part of a bigger investigation.’ That’s just that. It’s a conflict, not just a fight and at least they both have a perspective. That was my entire thing, giving everyone a perspective going into the set pieces, so it’s not just punching and fighting."
He did say, though, that regardless of his reputation among the fans, he lost as many battles with Marvel as he won; not only did they not allow him to add a second villain to the film, but on top of that, he was told at the outset that Coulson had to kick the bucket in the film.
“Coulson’s death was mandated in the first meeting by Kevin Feige,” reiterated the director. “ I can’t say that enough times. Apparently I have some kind of reputation that we won’t discuss right now, but I do love to kill people. Clark himself said when we were shooting that it was obvious that it had to happen, otherwise all of this becomes irresponsible. There’s no toll or actual downside to this very bad idea of bringing all of these people together. As a film it’s just irresponsible. That’s why we’re bringing him back for a S.H.I.E.L.D. series.”
It's hard to say exactly what he means by that last bit, as CBM points out, but it seems likely that the "him" in question isn't Agent Coulson, but Clark Gregg, who was being referred to immediately before. Since Gregg knew that, despite what would be in his own best interests, his character had to die in order to serve the needs of the film, Whedon may be saying they're bringing him back because a guy like that deserves another go-'round.
He also noted that Buffy the Vampire Slayer could have been an animated series (probably rather than a comic book series from Dark Horse, saying “We got to do almost everything we wanted to do,” says Whedon. “The only thing we didn’t get to do is an animated version, which was a delight for us because the writers themselves were working on it. We wrote seven scripts … it was ‘what could we not do [on the regular series].’ They were really fun to write. We could not sell the show. We could not sell an animated BUFFY, which I still find incomprehensible.”
And, on the technical part of making a film like this, Whedon told his audience,
“This is the worst thing you could ever do to yourself,” he says about writing a movie with existing continuity. “AfterSERENITY I said, ‘I’ll never do this again. I will never again make a movie where some people have seen what came before, some haven’t and all these characters know each other, but I have to introduce them to a new audience. I was like, ‘that was a terrible idea for a movie. My next movie is going to be about one guy. It might be a film called TO BUILD A FIRE. That sounds ideal.’ And then, I’m sitting at my desk [with THE AVENGERS]. I’m like a goldfish. The same thing again and again. It’s unbearable.”
He added, “Once you’ve actually directed and go back to writing, that guy who you always hated is yourself,” he says. “I talked to James Gunn about it. He shot SLITHER the same year I shot SERENITY. [Afterwards] we both had been completely blocked, realizing, the director, had killed the writer in us.”