I don't know how accurate this is buthttp://www.brianhartzog.com/beatles/beatles-songwriting.htm
has interesting bits about Lennon and McCartney.
A good songwriter can write away from his/her own moods. Try writing to a title. Could be a news event (Olympics, hurricane), a person (mom, dad), something you saw today (hummingbird) any title. Some of the songwriting forums such as 50/90 and MusesMuse will have a plethora of ideas as to titles, or themes. Ideas are not hard to come by. Taking them and bringing them to music and then connecting to listeners is where the songwriter or composer comes in.
For the vast majority, time and effort have a strong correlation to results. Yes, some geniuses such as Lennon and McCartney will do more in a short time, than an average person can hope to do with a lifetime of dedication. However, the average person can do quite a bit, if they are willing to spend time on the task.
A beginner pianist that waits for inspiration to practice will tend to lag far behind the person that commits to practice time every day. It isn't all that different with composition or songwriting. The beginner that works at it every day will tend to make much more progress than the one that waits for the magic to come to them. Some books on the subject will lead a beginner through a series of music writing exercises, so the beginner gets used to writing and creating. At some point, there may be burn out, but most beginners are not any where near that point.