Not only was the late Stan Daniels (co-creator of Taxi, co-producer of the best seasons of Mary Tyler Moore) a great comedy writer; he was also a songwriter. He wrote the songs (music and lyrics) for the musical So Long 174th Street, and when he and Ed. Weinberger created Phyllis, Daniels wrote the lyrics for the hilarious theme song -- one of the few TV theme songs that's a direct parody of another songwriter (in this case, Jerry Herman):
It's interesting how many television writers started out as songwriters, or aspired to become songwriters. Joe Keenan (Frasier) and the team of David Crane and Marta Kauffman (Friends) are only two examples of people who were librettists/lyricists before they went to California to write for TV. Tom Whedon, head writer of The Electric Company among many other credits, was a song lyricist, and of course his son is a career screenwriter who aspired to write musicals. Bill Persky and Sam Denoff wrote music and lyrics for Broadway-style songs in many episodes of The Dick Van Dyke Show. Arnold Horwitt, who wrote the lyrics for the Broadway show Plain and Fancy (with the song "Young And Foolish" that Eddie Fisher made into a hit), later moved out West to write for sitcoms. And of course, there was that writer for the television comedy Topper, Stephen Sondheim. Many, many other examples.