I think it was Hemingway who said that he doesn't like writing, but he likes having written. I don't necessarily like writing that much either. Writing isn't always easy - sometimes it's really hard.
Having said that, in my opinion writing, even bad writing usually beats not writing at all. As much as it pisses me off when I can't seem to be able to put together coherent sentences, not writing many times feels perhaps worse.
But in order to be able to write something, you need ideas. For me personally, it's not that easy to get them. Nothing happens when I don't have a clue what to write about. I'd like to write about something, but the ideas, they just don't keep coming.
It helps to have a certain writing routine that you try to stick to most of the time. It also helps when you have goals that you try to reach. These are the things that give us a feeling of having control over the process.
That is the rational approach to writing. Planning, thinking about writing, being analytical about the whole process. Thinking that we can decide what to write about and when to write. Thinking that we're in charge.
In reality though, we can't always decide when and where to get ideas from. That's not how our minds work. Our ability to control it is much more limited than we are willing to admit to ourselves. That is because our emotions play a big part too.
In my case I can safely say that I tend to get ideas and I'm actually motivated to write when I'm feeling mad over something that has happened in my life. I have the need to vent and I have to get rid of my frustrations. This seems to work rather well.
What also gets me started writing is when I feel depressed and life becomes pretty unbearable. This forces me to do something - and writing helps, because it makes me concentrate on things other than my problems.
If I don't feel bad enough or if I don't feel angry enough, it's usually hard to get anything done. There are exceptions too: sometimes I do like writing and sometimes I'm even excited to start writing, but those days are few and far between. I just don't get ideas.
In any case, when it comes to writing it usually doesn't hurt when you're hurt. Most of the time the worse you feel, the better you write. If you're mad or depressed, there's a decent chance that something good is about to happen.