The dark shadow emerges when Billy can't figure out why he keeps getting in trouble for stupid little things like not putting his hammock away properly. He goes to the old Danish man, the Dansker, who tells him that Jemmy Legs (that is, John Claggart, the master-at-arms) does not like him. Billy is incredulous and can't begin to fathom what Claggart could have against him. His very innocence portends a tragic end: If he can't understand the dark power, then how can he combat it?
There is a period where Billy's doubts seem to be dispelled. In the narrative, it is linked with the moment where he is down in the mess hall with the men and he spills his soup. Claggart cracks a joke about it, and Billy takes this as a sign of good faith. He laughs with the other men and wonders how anyone could think that Claggart dislikes him. While Billy is reveling in his naiveté, we as readers get a sense of what's coming when the narrator describes the distorted expression on Claggart's face as he walks away.
Things begin to turn bad for Billy when the afterguardsman comes and tries to get him involved in a mutiny. The real moment of isolation, though, is when Claggart comes out and accuses him of treason. There is no moment when Billy is more terrified and alone than when he is standing in Captain Vere's cabin, trying to push through his stutter and defend himself. We later learn that what upset Billy's mind was the simple fact that a man as evil as Claggart existed. For him, that was more frightening than the thought of his own death.
The narrator tells us that Billy is resigned to the idea of death. Yet even if he is at peace after killing Claggart, his own sense of isolation now seems to be transferred to Captain Vere. It is now Vere who feels that he is wrestling with good and evil, doing his best to make them align with right and wrong. The pressure is so great that the surgeon wonders if Vere is losing his mind. Later, when he dies, it seems as if his guilt over Billy has pushed him into delirium.
Now take this idea of redemption with a grain of salt. And not just a grain of table salt either, one of those big fat grains of rock salt that you use for cooking.
If you reject the idea of redemption altogether, then the story is simply a tragedy, but you have to recognize that the narrator portrays Billy's death in a religious light. Supposedly a light gleams across the horizon that seems to be the light of the Lamb of God, and we are urged to think of Billy's own death in relation to Christ's in the New Testament. It seems that the narrator seems to think that Billy has been saved in the religious sense.
The other aspect of Billy's redemption is that we find he has become remembered as a sort of mythical hero. In the sea poem dedicated to him, and also in the current narrative, we get a sense that Billy has been resurrected in the words of others. The point is that if other people can hear his story and take inspiration from it or learn from it, then he did not die in vain. Note that this is a very sensitive point and you can argue it either way, but this is at least what our narrator is betting on.