What's important here isn't Hamm's difficulty in hearing, it's the repetition of the word grey: the deafness is merely a plot device to bring it to the fore.
Greyness is an important motif in the play, which is essentially a deconstruction of the human condition as one of eternal misery. The stage directions suggest the actors be illuminated with "grey" light. Traditionally, black is associated with death and white with birth, therefore Beckett wants us to associate grey with the period in between: life. Of course, we also associate grey with gloom and decay, which is very much how Beckett wants the audience to view the human condition.
Repetition is used here, as elsewhere in the play, to highlight the cyclical nature of this condition. There are repetitions of Hamm knocking on a wall and Nagg on a bin, and of Clov taking steps. A sequence of events to get the windows open is also repeated several times during the play. This repetition evokes tedium, perhaps the most common misery of life, and suggests there is no end to this suffering and no sense, because there is no point at which the repetition concludes and can be scrutinised for meaning.
So this brief exchange is very effective at intertwining and highlighting these two major aspects of the play. That said, Hamm's deafness also ties into the themes of the play: decay and suffering. All the characters are sick and ill in some manner.
- Brater, Enoch. “BECKETT’S SHADES OF THE COLOR GRAY.” Samuel Beckett Today / Aujourd’hui, vol. 21, Brill, 2009, pp. 103–16