Why are some people unable to easily memorize the lyrics to a song? Although I have listened some songs hundred of times I can't sing the lyrics to any of these songs from beginning to end without pauses. However I am able to whistle the whole song without difficulty. 

It seems other people are complaining about this annoying condition as well. This particular answer claims it is quite likely related to the interhemispheric communication:


  I also find that when I take the supplement piracetam, my ability
  improves. (It has in fact improved over time anyway)
  
  Piracetam has something to do with interhemispheric communication.


Any answers for what causes this condition?
From an information processing perspective, I'd conjecture the following points:

Many songs have lyrics that are difficult to decipher. If you can't decipher the words, then you wont be able to recall them. If you decipher alternate words, then this may reduce the degree to which the words have semantic meaning, and therefore the ease with which the lyrics can be retained and recalled.
Even when the words of the lyrics are readily discernible, lyrics vary in the degree to which (a) they have easily discernible meaning; (b) follow standard grammatical structures; (c) repeat lyrics, etc. Recalling meaningful sentences that follow standard grammatical structure is much easier than recalling random words, and increasing the depth of processing (i.e., greater meaning) of the material should also help with recall (see this discussion of level of processing effect). There would probably also be a range of other effects related to properties of the lyrics which would make a given song easier or harder to recall (e.g., rhyming and rhythm in lyrics might make lyrics easier to discern).
Practice is a fundamental effect in recall. Thus, the more times a person has heard a  song, the better they should be at recalling. However, I think this should be qualified with the above points. If a person has heard a song 100 times without actually being able to decipher some of the words or understand their meaning, then that practice may be largely wasted.
Practice also applies to recall, and this would be closely related to context effects. Thus, if practice always occurs within the context of the music being played with singer present to assist with any forgotten lyrics, then the person has never practiced in the absence of such cues and may be dependent on the cues. Practicing trying to recall the song without the song in the background, and then with feedback on failed sections would presumably be more effective than just singing along.
All the above also relates to the distinction in the expertise literature between deliberate practice and play (see, Ericsson, Krampe, &amp; Tesch-Romer, 1993, PDF). When people listen to songs, the aim is typically to have a good time rather than to learn the lyrics. Deliberate practice in contrast would involve a deliberate effortful practice regime aimed at learning the lyrics. For example, it might involve a detailed study of the semantic meaning of the lyrics, then repeated recall of the lyrics without assistance, and then correcting on failed sections (e.g., think of an expert pianist learning a piano piece and working on difficult sections, etc.).

Individual differences

You ask the question of why some people appear to be better than others at recalling lyrics. It's an empirical question as to whether there is a domain general difference.
Presumably, it would reflect a combination of the above effects: e.g., different levels of practice; different levels of understanding of the song lyrics, and perhaps also some more
general ability related to verbal recall.

Recalling melody versus lyrics

You also ask about why you can recall the melody but not the lyrics. hearing a melody does not require you to understand the lyrics, even if understanding the lyrics might act as useful cue. Thus, in the context where a person does not completely understand the lyrics, he or she may have years of practice hearing the melody, but almost no practice with a semantically meaningful understanding of the lyrics.
There would also presumably be a wide range of variables in the person that would make them better at recalling a melody (in particular, pitch perception, singing, and musical ability come to mind as factors that should simplify the task of learning a melody).
Then one could also look at characteristics of the melody which made it harder or easier to recall (e.g., degree of repetition, simplicity of intervals, familiarity of the intervals and structure, etc.).