Art
Writing
There are artists I actively seek out and follow; one of them drawing a book or a favorite character may well sell me a title I wouldn't otherwise buy.
Writers are more a list of ones I'm sure I won't like.
"At what point do we say, 'You're mucking with our myths'?" - Harlan Ellison
Me am think both are equally unimportant, but don't prefer writing over art
Don't look at Grant Morrison Animal Man for a horrible example. Art is great but writing is so bad, it makes up for it
Seeing that I'm a very visual person I would have to say that art has A LOT to do with it for me. Writing is important but if the art is horrible I'm really not all that inclined to read it at all. There are a few artists that I just don't like and I have to go and force myself to read those issues if they are important part in later stories. Art is what got me to read the Justice League series as well as Batwoman.
They go hand in hand as far as comics are concerned. If it's just a poster or something, then art all the way.
Writing. Save for a few artists like Jim Lee, I always look at who's writing a comic book before I buy it. There are some exceptions - I've bought runs of Batman, Spider-Man and X-Men regardless of who the writer was, but that didn't always work out well (Milligan's X-Men, I'm looking at you). Recently I've found that DC has a font of amazing writers. Geoff Johns is starting to become a favorite for me, on par with Bendis and Brubaker as far as long-term planning.
But there will never be anyone greater to me than Grant Morrison, Terry Moore and Frank Miller.
Tough choice. I think in sequential art it's literally a 50-50 split between art and writing (keeping in mind that 'quality' is a diverse thing ... in other words, it's not just a question of whether the art and writing is good ... but whether the distinct styles gel well together)
... but in the end if I can only choose one, I'd say: Art
I have yet to read a Christ Yost book that I really enjoy - I tried his New X-Men which wasn't all that great, and various short runs on Spider-Man and a few other books. Nothing has really stodd out to me. Dan Slott too - he's a good workhorse writer, brings in nice tales when he has short runs on Spidey and such. Now Matt Fraction, I have really dug some of his stuff, especially S** Criminals, and I love Warren Ellis and Brian K. Vaughan.
But Morrison is just so crazy, nuts, out there - reading his books are like looking into the mind of God on acid and trying to decipher raw Universal Consciousness simultaneously. And have you ever read Terrry Moore's Strangers in Paradise DV1? Seriously, even if you don't like the plot you have to agree that it's some of the best character work ever committed to paper - whether for prose or sequential writing.
Art.
I'd rather have both, because one or the other being bad is criminal to me. Think of it in terms of the average movie. Does great acting save a poor script? No. And we all know that bad acting will destroy even the best script.
To me, poor art is like bad acting. It doesn't matter how good the story is if the art suffers. But if the story is lacking and the art is excellent, at least that's something. Only thing is that the artist is wasting himself, which is what makes it a crime. But then the artist is getting paid for it, so it's us readers who really suffer.
Comic books are a collaborative effort so there's no straight answer to this.
Lately I'm way more of an art guy. I blame my girlfriend, she's an artist and even though she doesn't read many comics, she'll peer through mine and pick apart the flaws. I love it, since I miss a lot of that stuff.
Great art will get me to buy a new book once, but it's the writing that will bring me back. But like most either/or questions the real answer's not one or the other. And characters, genre, format, and even over-repetition of a theme (I love dystopian future and dark alternate reality stories but I'm burned out on them right now) can make a huge difference.
For me when I pick up books the deciding factors are usually 1.characters in the book 2.what the art looks like. Although there are some books I would get regardless.
Writing. Good writing can make up for poor art, good art can't save poor writing. Though of course, it's best to gave good art AND writing.
Writing but my god the dark knight returns looked so bad lol. No reason you can't have at least decent art. Plenty of talent out there.