It helps to be musically inclined and educated. But its also profoundly important to geninely be able to write good music - many types of good music.
Born a Music Lover
I flipped levers up and down and turned knobs but was left frustrated. I could not make my mother's electric organ sound anything like the sounds I heard on Gordon Lightfoot's "Wreck of the Edmond Fitzgerald." I needed more knobs and levers! Worse yet, other kids would just flip levers and turn dials at pure random while pounding on the keys with full palms and singing at the top of their lungs; cacophony! Pure noise! How could they not understand how to make music?!
I also hated reading music. I can read it, but its like speaking a foreign language you only understand the basics well of. Its not the language my brain sees when it thinks music. One of my teachers caught on and stopped playing the songs as she gave them to me to learn; I HAD to read the music! Horrible!
Guitars are weird too. The shifted logic just doesn't sit right as you move from string to string. But a piano keyboard - now we're talking! Knobs and levers! Dropping notes with a mouse on a grid! Waving your hand over a light beam! Singing! What joy! Now if they can just get that brain-to-MIDI interface working.
Concert and Jazz Band in school. Piano lessons. Flute recorder in 3rd (and 4th) grade. These do not make a music writer. Even Juilliard can help a lot (No, I never went to Juilliard). Playing in coffee shops for tips, sure... and talent shows. In fact, my experience taught me a few things; I will never be a great song writer (not good with lyrics), nor a great performance musician (klutzy fingers). Instead, I write great music (think soundtracks, jingles, etc.).
Apparently, the experience I needed in life to make me a great music writer was, well, life. Somehow, suffering seems to lead to great music. Just ask some of the most famous music and songwriters out there. Part of the reason why, I think, is because, not only is music very logical, mathematical and structured, its also extremely emotional... or it should be. There are very specific reasons why some notes go together and other do not... unless you mix in the right supporting notes/beats, etc.
When life knocked me over the head with PTSD, suddenly all forms of art I had tried to be good at before became brilliant. I didn't write cheezy or simpleton anymore, like I mostly used to, with an occasional wonder popping out here and there... unless that's what I'm trying to write. Usually its the young ones who write wonderful music then get stale as they age. Sometimes, its the reverse, as in my case.