A story is like a car that runs on emotion. The author's feeling is the gasoline in its engine. Take away its fuel, and even the shiniest, chrome-plated literary power plant is reduced to so much scrap iron. --Dwight V. Swain
You probably get the point from the quotation, but I do love to blog. So, I'll run on about it a bit here.
My best writing comes when I feel passionate about the topic or the story I'm writing. We all know that that's true. Sometimes we can force it and put the passion in during the re-write stage, but it often isn't the same.
It's best to really think about the story, the reasons you want to write it, and the importance of the theme to you before you start writing. Writing before you have thought it through rarely works.
I think it helps to develop a routine to rev your engines before you start writing. The routine might be to walk around the block or around two or more blocks to let the rhythm of exercise clear away the mundane and let in creativity. Or it might be that you clear your desk of everything else, put on some music and sit quietly for a while before writing.
The particulars of the routine don't matter. It's how it works for you to help you to center your thoughts on your story and your passion for it. Don't settle for passionless writing!