In Cantonese songs, one of two things happen — the tones are preserved in a particular way, or the tones are ignored. The paper Tone and melody in Cantonese by Marjorie K.M. Chan has some information on how often the tones are preserved, showing that the tonal contrasts are largely preserved by the melody in a small sample of 90s HK pop songs. The paper is about the relative pitches of adjacent syllables, but there is a second mechanism for preserving tones in the melody.
In my experience, in Cantonese songs which preserve contour tones, this occurs by applying a grace note to the syllable, so that it starts below the notated tone. You can hear this in, say, 男兒當自強, where the rising contour tone syllables 膽, 打, 似 are sung with a lower grace note. The grace note is on the previous note of the scale in 膽, but a semitone below the notated note on 打.
I don't know of any singer who tries to preserve the Cantonese low-falling tone (tone 4) with an upper grace note, though.
This manner of preserving tonal information can be applied even when the original melody was not written for the lyrics, as in 每天爱你多一些, which was written for a Japanese song.
Off the top of my head, I can't think of a Cantonese song which ignores contour tones altogether, although sometimes you hear Happy Birthday sung with the Mandarin lyrics in their Cantonese readings (祝你生日快樂 etc.), and I think the contours are not generally respected.
Many Mandarin songs, on the other hand, obliterate tone distinctions and don't try to preserve them in the melody. 朋友 by 周華健 is an example of this.
I suspect that the greater number of contour tones in Cantonese is the reason why singers at least try to preserve the contour/level contrast. It would be interesting to get data on whether singers in other tone systems — Thai and Vietnamese, for instance — preserve contour tones or not.