Dylan Thomas probably wrote this poem in 1945, when his father was seriously ill. It was published after his father's death. In the poem, Thomas is pleading with his father to fight the coming of death.
Thomas presents varied experiences that men may follow through their lives and shows why, regardless of the type of life a man has lived, he should "rage against the dying of the light (of life)" and refuse to "go gentle into that good night."
Wise men, even if they recognize that it is time for them to die, will understand that they still haven't changed the world or left their mark sufficiently - "their words had forked no lightning" - and so they should fight to remain alive and able to share their wisdom with others.
Men who did many good deeds during their lives may, in their final moments, realize how much more they could have done. They may, then, fight to stay alive and continue their good works.
"Wild men" who lived adventurous and robust lives eventually come to understand that they cannot escape death; they continue to struggle to remain engaged and active in life.
"Grave men" could be understood to be referring to serious men or to those very near to death. In either interpretation, they "see with blinding light" the value of life and Thomas encourages them to fight to keep it in them.
Finally and personally, Thomas begs his father to fight against his approaching death.