As a professional writer, I try not to let mood get in the way of my work. I sit down and I write. That’s my job.
That doesn’t mean that mood plays no part in my work, however, because writing—especially when writing a story—it helps to evoke the mood of my story while I work. I’m not talking about whether I’m tired or hungry or whatever. I’m talking about recreating, in some small way, the emotional tenor of the portion of my work that is unfolding. Usually, for me, this means picking out an object to use as a tangible concept of the mood I’m trying to create. If it’s something small, I try to keep it near me. If it’s something big, I take my laptop and go to it. More than once I’ve found myself lugging my laptop (or paper and pen) upstairs to sit out under the moon. The moon can evoke many moods, and I try to capture the right one for my purposes and then get to work. Other times it’s a small bauble of some kind that I can hold in my hand. The tactile impression of the trinket helps me to create the mood with my words.
This, of course, doesn’t change the fact that I may be tired or hungry or irritable. It doesn’t change the fact that the words might not flow as easily as I might like. But it helps create within myself the mood I desire to evoke, which helps me choose the words and structures that best suit my needs.
So, don’t give in to the notion that you have to be in the mood to write. But do make a to evoke the mood for yourself that you wish to create in your work.