Well, the title says it all:
Do you say "the lyrics of the song" or "the lyrics to the song"?
Is any of these wrong?
And why?
"of" is more common, but both are correct..."to" is used to indicate possession, just as "of" does.
Neither is incorrect; however, both "to the song" and "of the song" get in the way of communication.
I'd prefer to read or hear "the lyrics", or maybe "the song lyrics". Shorter, clearer, and less typing!
This is an odd one. Words and lyrics are synonyms (I can't spot a difference between Who wrote the words? and Who wrote the lyrics?, or Learn the words and Learn the lyrics—except that lyrics founds fancier, as you'd expect from a Greek borrowing versus a native Germanic root). Nonetheless, they do not go with the same prepositions.
With words, I prefer to over for:
The words to this song are great
? The words for this song are great
But with lyrics, I prefer for over to:
? The lyrics to this song are great
The lyrics for this song are great
My guess is, there's nothing principled here, just an ad hoc quirk in how English has developed.
A couple of other observations. Both words and lyrics seem to go with of (and possibly in):
The words of this song are great
The lyrics of this song are great
The (dis)preference of to and for can be overridden by the verb:
Who put these lyrics/words to this song?
Who wrote these lyrics/words for this song?