Throughout "Do Not Go Gentle into That Good Night," the speaker tells his father that he must fight against old age and against the inevitability of death. Between the second and fifth stanzas, the speaker describes different kinds of men and says that each kind has fought against old age and death. In this way, the speaker hopes to convince his father that he, too, should fight. The speaker does not want his father to give up and fade out.
In the second stanza, the speaker says that "wise men" fight against death when they realize that "their works [have] forked no lightning." In other words, these "wise men" realize too late that their wisdom has had no impact, and they fight against death because they want more time to make more of an impact. In the third stanza, the speaker says that "good men" also fight against death because they realize, when confronted by death, that their good deeds have not achieved enough. They want more time to achieve more.
In the fourth stanza, the speaker says that, like these "wise men" and "good men," "wild men" also fight against death when confronted by it. By "wild men," the speaker here perhaps means men who have lived hedonistically, for their own pleasures, without a thought for anyone or anything more lasting than those momentary, transient pleasures. These men fight against death because they "learn, too late" that their lives have been meaningless and hollow. These men "grieve" when they see that the sun, which represents life, is "on its way." In other words, when the sun is setting on their lives, these "wild men" are full of regret and grief that they have not made more of those lives.