Good men, the last wave by, crying how bright Their frail deeds might have danced in a green bay, Rage, rage against the dying of the light.
Once again, the best way to understand how all these poetic images work together is to untangle Thomas's sentences, which are all twisted up so that they fit the meter and form of the villanelle.
The basic parts of this sentence are the subject, "Good men" (line 7), and the verb, "Rage" (line9). In the speaker's opinion, true goodness consists of fighting the inevitability of death with all your might: "Good men […] Rage, rage against the dying of the light."
Next, Thomas adds an image of the ocean waves; the most recent generation of good men, the "last wave by" (line 7), are about to crash against the shore, or die.
As they approach death, these men shout out how great their actions could've been if they'd been allowed to live longer.
Or, to use the metaphor in the poem, as their wave crashes against the rocks, the men shout how beautifully that wave could have danced in the bay if it could've stayed out at sea instead of rolling onto the beach.
So this generation is like a wave, death is like the breaking of the wave on the shore, the sea is like life, and the dancing waters in the ocean are like beautiful actions.
The bay is "green" because the sea is really brimming with life – plants, seaweed, algae, you name it.
In this image, being out at sea is like life and coming back to the barren shore is death –the opposite of the metaphor you might expect, in which drifting out to sea would be like death.
Notice that Thomas describes the good men's potential future actions – the things they won't be able to do because they have to die – as "frail deeds." It's not clear whether the men or the actions are weakened by age; perhaps both.