The short answer to this question is: Wherever. <Update> As I type this, I am sitting in the company break room working on my latest yarn– on thin web site– from my cell phone. </Update>
It’s not quite that simple however. I have heard stories of writers writing on the train, in the car on their lunch hour, really every waking moment that they are not working their day job.
When no paper/pen/keyboard are available, I have been known to write into my phone if necessary and then refer back to it/retype it later.
Good lighting goes without saying, but what about music? I personally don’t play any music (I find it distracting), but some writers like to get “in the mood” depending on the scene/story that they are writing. Either works fine– if it works for you.
The time of day is important only insofar as it helps you keep a “rhythm” of writing every day. Creative juices flow better like a water pipe– not like a river. A river has rocks, twists and turns, and backwashes that impede the flow. Important errands ARE important…but if allowed to continue….they do interrupt my writing routine (hence, into the phone or in the car if necessary).
Some writers still prefer paper and pen/pencil over a keyboard. I still prefer paper and pen when I’m trying to sort out my thoughts– only in my personal life. There is some sort of MAGIC that happens during “paper and pen” that does not happen on the keyboard. To each his or her own though I guess.