There can be no doubt that Moore is the all time best. Almost everything he's done has been groundbreaking. Miracleman, Swamp Thing, Watchmen, Killing Joke, League, Tomorrow Stories, V for Vendetta... the list goes on and on. What's more, without him, many of the British writers, including Gaiman, would have never even entered the field.
Having said that, Stan Lee is the most important writer of all time. He (with Kirby, Ditko, Heck et al) simply changed what mainstream comics could do. His brand of melodrama might have been over the top sometimes but look at DC's simplistic strips in the 40's, 50's & 60's and tell me what's better.
Those who say Kirby & Ditko deserve all the credit are wrong. Comics ARE indeed a visual medium but look at Kirby's New Gods epic. Great characters & visual concept but the dialog was just awful. It took me 'til my 20's to figure out what he was trying to do and, at the end of the day it failed. Kirby's return to Marvel in the 70's wasn't much better.
Stan might not have come up with all the ideas but he knew how to make them work.