It's important to put your ideas down on paper whenever they strike you. Also, just listen to as much music as you can in the genre that you're writing songs. For example, if you want to be a great folk songwriter, listen to a ton of folk music! It also helps to step back on occasion and really remind yourself why you're pursuing this goal.