I consider myself to be a slow coder, so my thoughts may be somewhat biased.
I have worked with fast coders and to see them work is incredible. Clearly, they are on another level of thought or plane of existence - at one with the system perhaps?
I have also at times had moments of being able to code rapidly.
What I've learned is it comes down to 3 things:
And I'd go so far as to say that point 3 is the most important one. If you can form a mental path in your head about what code to write to achieve the desired functionality, your coding will be speedy.
On the other hand, even if you have a fair degree of muscle memory for your chosen language and preferred tools, you could still be "slow" if the task at hand is totally new to you and requires you to take your time.
The biggest downside to being a fast coder is your error rate will be very high. And if you try to be fast in the context of a domain you don't understand, you will most likely introduce problems that you don't fully appreciate until much later, by which point it could be too late.
The fast do not always win the race!