For the musical side of the equation, start with guides like the How to Write Songs on Keyboards and The Songwriting Sourcebook, both from Backbeat Books. These best-selling coursebooks provide detailed instruction for crafting great melodies. Songwriting instruction books tend to cover specific topics, so search for the one that teaches what you're looking to learn - for instance, the Hal Leonard Song Charting Made Easy guide for the Nashville number system, or Alfred's The Complete Idiot's Guide to the Art of Songwriting if you're an absolute beginner.
The second key component to good songwriting is coming up with strong lyrics - a pursuit to which you'll find no shortage of books devoted. Some, like Hal Leonard's Bruce Springsteen Songwriting Secrets and The Beatles Lyrics, offer insight through the eyes of the century's greatest songwriters. Others, such as the Backbeat Books Lyrics - Writing Better Words for Your Songs and the Alfred Rhyming Dictionary Mini Music Guides Book, are more general-purpose examples that you can apply to your writing no matter your musical style.
There's a lot of room for versatility in the world of songwriting, and you'll find that fact firmly backed up by the selection of songwriting instruction books and materials found here. There are excellent resources for anyone, from the aspiring hobbyist songwriter to the most experienced lyricist; even if you're already at the top of your game, you might find the perfect book to help make your process faster and easier. They're definitely worth a look, so don't wait around - check them out!