Basic knowledge of music and melody is helpful, but songwriting doesn't require a music education. Emotional literacy is what matters. There are generations of timeless songs "written" by illiterate songwriters, and brilliant songwriters who don't play any instruments at all. Irving Berlin, the composer of countless beloved standards couldn't read or write music. He played almost entirely in the key of F-sharp, allowing him to stay on the black keys as much as possible.
-- Mary Gauthier