Ah, this is always an interesting question.
Do they have to adapt the tones to the music? In ancient times, yes. There used to be melodies that you would use as a meter for your poetry. One famous example is the lyrics to the pop song Dan Yuan Ren Chang Jiu (但願人長久), sung by pop artistes like Teresa Teng and Faye Wong, which is actually a poem in the cí style written by Su Dongpo. The poet himself actually based the meter of the poem on another melody, known as Shui Diao Ge Tou (水调歌头, http://en.wikipedia.org/wiki/Shui_diao_ge_tou), which is not the melody of the pop song.
Nowadays, these rules are not observed so strictly, so that is why some people say that they can't understand what the singers are singing. This is actually a well-known consequence, and there are mondegreens that arise from the mismatch between the intended tone of the syllable and what the melody forces the singer to produce.
Good songwriters will, in any case, work very hard to make sure the tones in the lyrics match the melody of the music.