How can a drummer write a song?
A song is intrinsically only chords and a topline with rhythm outlined by gaps and repetition. Lyrics are 50% of that formula on top. As a drummer you have no song writing parts so you will need to push yourself into lyric writing and singing over piano or guitar.
Do drummers write music?
Yes, a lot of them have contributed to the creation of some of the best songs of all time, or have written them all by themselves. Here is the list of some those famous drummers that are also great songwriters.
Do drummers get songwriting credit?
Co-writer Rights
Some drummers are considered songwriters, some aren't. Some guitar players are considered songwriters, some aren't. It really depends on the agreement you have with your bandmates, and the extent of your contribution to the song in question.