The characters literally combine to mean “grieving soldiers must win.” The logic is that the emotional power of fighting to avenge a wrong or defend one's existence provides a moral and psychological advantage that outweighs material or physical superiority.
`哀兵必胜` is a formal, literary idiom used to add weight and a sense of historical drama to a situation. It is almost always used in a positive, inspiring context.