The actor is important, and maybe this is just my self aggrandizing bias as a writer, but a big part of why the actor is important has to with the star worship system that has developed as a promotional tool in Hollywood. That sometimes system gives actors more creative control than, perhaps, they should have. By the same token, it also sparks ideas based on actor chemistry and capability, as mentioned above. One of the greatest challenges in screenwriting is restraint; a writer has to be able to take about ten million steps back and let the acting, art design, wardrobe, cinematography, score, editing, and countless other teams influence and even transform the final product. At the end of the day, though, good writing speaks for itself no matter who is in a role. Although Buffy did have a great cast, what makes it stand out is the writing. It isn't just the usual trite TV fare; it's something more ambitious than that. Layers of meaning, symbolism, and metaphor are delicately woven into the text. This richness of writing would have been there no matter who played Angel or Spike.
The best example that I can come up with is that of a recent story on my favorite soap opera. It's a daily 1 hour drama, so you've got to expect low production values and rushed writing and acting. You also have to expect recasts, which is sort of why I bring this up. In this story, a child was shot in the head by a bullet intended for his mafia kingpin (adopted) father. It was an accident and a tragedy but, even more than that, it was the price that his three parent figures paid for the violence and mayhem in which they had indulged for the duration of this child's life. The parents were torn up with grief and guilt. At first, they supported one another, but when the news came down that the child would be permanently comatose, they turned on one another, each of them attempting (ineffectually) to find someone to blame even more than they each blamed themselves. Without getting into too much detail, let me just say that these three have in their own way as complicated and twisted a relationship as the Angel/Buffy/Spike relationship. The difference is that one of the characters -- the woman -- has gone through four different actresses. The actress playing the role of the mother in this story was three actresses removed from the woman who had played her when the child was born and the father figures were chosen. Even so, these scenes were still powerful and moving. No matter what the most recent actress does with the role, Carly is still Carly. She's still a brash, impulsive, selfish, loyal force of nature. She still loves both of these men and has with them intensely complicated relationships that have led to this heartrending moment. She still leans on Jason and self-destructs with Sonny. At the end of the day, it isn't the current actress who grieves for and fights for her son; it's the character, Carly. And that character comes from the writers.
From my perspective, then, I definitely think that the writing matters more than the acting. As important as acting is, I think I would have felt similarly about both pairings no matter who had played the male leads. Angel would always be brood boy. Spike would always be the crazily complex character that he is. The acting simply serves to translate those aspects of the characters to the audience. Bad acting can block certain things from getting through to the audience and good acting can make certain aspects of the character shine, but neither character traits nor character development originate with the actor. The actor just delivers the message.