This is up to your DM
There are four stages for a soul captured by a Night Hag:
- In the soul bag1
- Released in Hades
- Made into a Larva
- Killed in Hades
Reanimation Spells
There are several spells to recall the soul and reunite it with the dead body: Revivify2, Raise Dead, Reincarnate, Resurrection, True Resurrection and Wish. They all differ slightly but (with the exception of Wish) share language that the soul must be free and willing to return. There is also a general statement on p.24 DMG that a soul cannot be returned to life if it does not wish to be.
For the rest of this answer, we assume willingness. It is highly likely that a soul being tormented in Hades wants to escape and return to life. Moreover, in this case it is the soul of a player character whose player wants to continue playing the character. If not, the soul cannot be reunited with the body, and the story ends here.
So the only question we need to answer at each stage is: is the soul free to return?
In the bag
It is obvious that while the soul is in the bag, it is trapped, not free. How to get it out of the bag?
Negotiate a deal. If the hag agrees, she can release it. The hag certainly is able to do so. As the hag is immune to charm, she cannot be magically compelled to do so, she either needs to be convinced, tricked or threatened. This solution is unequivocal.
Obtain and destroy the bag. This likely involves killing the hag, but it might be possible to steal the bag from her. There is uncertainty about how hard it would be to destroy the bag, but consensus is that it is not an artifact, so it should be feasible. It is not unequivocal if the soul is released by destroying the bag, but the majority opinion is that it would be.
There may also be other ways, like bringing the bag into an Antimagic Field to suppress its function and release the soul, or even just opening the bag. As for #2, it is not clear-cut if these actions would free to soul.
If it is released before being brought to Hades, it is free and can be used for resurrection.
Released in Hades
As presented in MivaScott's answer, the bag is a transport vehicle, and the soul is going to be released in Hades. The duration of how long the released soul will stick around before being used is DM territory. Is it free to be resurrected during this time?
Consensus says this is not clearly defined.
According the the DMG, in Hades mortal souls take the form of insubstantial shades (Greek cosmology, p. 44).
Also according to the DMG, Hades is the destination of many souls that are unclaimed (...). These souls become larvae (p. 63). This can be reconciled with the statement that souls take the form of shades if the shades eventually get turned into larvae.
It is not clear if souls released from the soul bag are immediately transformed into larvae, or if there is a time -- up to forever -- during which they remain insubstantial shades. This would be up to the DM.
It is likewise unclear if only some souls become larvae, as in earlier editions), or if all do. The wording on p. 63 suggests all do, the shades on p. 44 contradict it. I think this is a cosmology-building decision left to the DM.
For the released soul as an insubstantial shade that is the soul, we have precedent from the Specter that such a form of a soul can exist (MM p. 279: "A specter is the angry, unfettered spirit of a humanoid that has been prevented from passing to the afterlife. (...) Some are spawned when dark magic or the touch of a wraith rips a soul from a living body.)" It also is accepted that it can be recalled and brought back to life.
There is no limitiation for Hades as a plane that would treat the souls there as trapped (as could be the case in Carceri). From this perspective, souls in shade form in hades would be free to be resurrected.
The DM may rule that the soul used by a Night Hag or its customers for trading or experiments is stored in a way that keeps it trapped. Then the party, to resurrect their friend, would need to
- travel to Hades (via Plane Shift or similar means), and free the soul from its prison
- contact the Night Hag or the soul's current owner and negotiate terms for release, similar to when the soul still was trapped in the bag.
Made into a Larva
Assuming the soul has been finally turned into a larva, either directly upon release from the bag, or after some interim period it spent as a shade, does the form of the larva impose entrapment?
A larva is living creature. Would this block the soul from being resurrected? The text of most reanimation spells requires touching a "dead creature". So then, what is a dead creature?
There is no consensus if "dead creature" refers to the corpse of the former creature (now an object, technically speaking), because this is what you can touch, of if it refers to the combination of body and departed soul.
If it refers to the corpse, then the status of the soul is immaterial and it can be recalled
If it refers to the combination of departed soul and corpse, one can argue that both parts need to be dead for the overall creature to be dead (if a soul could ever be dead). Since the larva is alive, the overall creature then could not be target of a spell that cares about the creature being dead. Revivify stills works, it only requires a "creature that has died", and die they did, not a "dead creature", but revivify has such a short window of time, it is unlikely to matter.
In conclusion, there is neither clear language nor consensus if it would be possible to resurrect a creature whose soul has been turned into a larva. So, this is up to the DM to rule.
Killed in Hades
What happens if the soul as an insubstantial shade (similar to a Specter) gets destroyed? We do not have consensus answers to guide us. This is up to the DM.
Hades is crawling with larvae. Night hags, liches, and rakshasas harvest them for use in vile rituals. Other fiends like to feed on them.
What happens if the larva gets killed, used in a vile ritual or fed upon, is the soul destroyed forever, or does this free the soul to be resurrected?
There is consensus that larvae count as native to the plane of Hades, even though the soul may have been from another plane originally.
There also is precedent both for demons, and devils (denizens of other lower planes) that they are utterly destroyed when they die on their native plane:
The only way to truly destroy a demon is to seek it in the Abyss and kill it there. (MM p.51)
Devils that die in the Nine Hells are destroyed forever. (MM p. 67).
Do these examples mean that if a larva dies in Hades, it also would be truly destroyed? There is no explicit language about it, so in the end it is up to the DM.
Final Conclusion
For most points we are not able to establish clear answers from Rules as Written or published lore, so they come down to DM to adjucate.
P.S.
For what it is worth, I liked Darth Pseudonyms idea that you can recall a soul that has been made into a lemure or larva, but it will be tainted and what you get back is a corrupted version of the former character; once your soul gets turned into a larva on Hades, there is no way to undo it fully. Maybe one could grant an exception to Wish.
I'll adopt the approach that if you destroy the shade or larva, the soul is gone for good, but before than you can resurrect the tainted soul. This makes Night Hags very tough - one of the few ways to permanently destroy a soul.
1The question is not limited to the first stage, the bag. Thomas's and MivaScott's answers assume that. Therefore another question was added to address the later stages. This post compiles findings from all related questions, answers and discussions.
2 Revifiy does not have the free and willing language, so it might be a way to get the soul back, if you still have the body and you cast it within the minute. There is a separate question discussing this case.