In order to really discuss great comic writers I believe it is necessary to segment them by time frames. Since I'm not an all knowing scholar in this I can only highlight whom I know as the best.
Starting with the Golden Age of comics I believe that Gardner Fox is the number one name that comes to mind. He had a hand in quite a few character creations and I believe was very prolific at the time. Joe Simon / Jack Kirby, Bob Kane, Jerry Shuster also have to be mentioned, along with Bill Everett and Carlos Burgos as they all were part of the creative process that brought many characters to life. During the Golden Age Superman, Batman, Captain America, Wonder Woman, Flash, Green Lantern, Human Torch, Namor, Atom, Doctor Fate, Spectre and many other great characters were created. Those writers set the stage for the Silver Age. Almost all of those characters are still playing roles in comics till this day.
The Silver Age was defined by Gardner Fox, John Broome, Stan Lee and Jack Kirby. While the full extent of what were Kirby's ideas versus what were Stan's will be forever debated you have include Jack Kirby in that mix. These writers created what is still being mined to this day.
Moving forward we meet with the great modern writers such as Alan Moore, Neil Gaiman, Chris Claremont and John Byrne (in their day) and many others. Alan Moore and Neil Gaiman stand out as the writers who took the writing to a whole different level and made it equal to and at times exceeded it's more recognized prose counterpart.
The current writers have a tendency to have far reaching histories but Warren Ellis, Grant Morrison and Mark Waid stand out as the strongest class of writers that are still producing wonderful work today, but have to be considered established stars and not up and coming stars.
Then we have writers who are very active and producing great work and are striving to be the next great writer, that group included Ed Brubaker, Mike Carey, Geoff Johns, Kurt Busiek and many others that don't come to mind immediately.
Then there are the relative rookies like Gail Simone, Jeff Parker, Robert Kirkman, Christos (?) Gage and others who are just starting to make their mark in the industry.
We have a huge pool of talented writers in comics today and in the past we had some fantastic people who gave us all these wonderful characters to play with.
All of this is a long introduction to who are the greatest all time writer in comic books. I would need to do extensive review of my collection and who wrote what but I believe off the top of my head the top writers of all time are:
Alan Moore - He pushed comics forward the same way Neal Adams pushed the art work forward. he made comic into something more then just comics. I believe the modern writing approach is a direct result of Alan Moore.
Gardner Fox - Between the golden age and silver age he produced more material then almost any other writer I can thing of. Some of his work is very dated, but the ideas and concepts that he threw into his stories are still being mined today. In fact what Gardner wrote in an eight page story are turned into six part epics expanding and exploring great concepts that he had in his stories.
Stan Lee / Jack Kirby - I refuse to separate the two. You could tell by reading some of Jack's stuff on his own that Stan added a lot, but you can also tell that many of the stories were really done by Jack with Stan adding dialogue and maybe some re-writes of his ideas. Marvel is the house the Stand and Jack built.
Neil Gaiman - Inadvertently Neil created one of the great long term series ever in Sandman. I say inadvertently, because no one knew how long this book would last or that it would be the flagship that allowed DC to successfully launch a second imprint called Vertigo. Vertigo has produced some of the most diverse and fascinating works ever produced for comics. Marvel has yet to get a second imprint of the ground and Vertigo is 15 years old.
After that I'm at a lost. Warren Ellis may be close and Grant Morrison is hovering in that category. Will Eisner may be in that class, but as he added so much with his art, I'm not sure his writing was as big of an impact. In fact for me Neil Gaiman just barely made it as the bulk of his writing in is novels and putting him in that category for one series is iffy in my opinion. James Robinson has done some great work and with Starman he deserves some nods.
There are many great writers and each era has a different audience and different taste, so it is hard to define who is the best of all time, but my top four I believe would be hard pressed to be left off any one's top ten all time writers list.