This Argument from Justice starts from the premise that in this world virtuous people are not always happy and do not always get what they deserve while wicked people do not always get the punishments they should. The balance of justice must be achieved somewhere and at some time, and since this does not occur here it must occur after we die.
There simply must be a future life where the good are rewarded and the wicked are punished in ways commensurate with their actual deeds. Unfortunately, there is no good reason to assume that justice must, in the end, balance out in our universe. The assumption of cosmic justice is at least as questionable as the assumption that a god exists and so it certainly cannot be used to prove that a god exists.
In fact, humanists and many other atheists point to the fact that the lack of any such cosmic balance of justice means that the responsibility is ours to do all that we can to ensure that justice is done here and now. If we don't do it, no one else will do it for us.
Belief that there will be cosmic justice eventually whether accurate or not - may be very appealing because it allows us to think that, regardless of what happens here, good will triumph. However, this removes from us some of the responsibility to get things right here and now. After all, what's the big deal if a few murderers go free or a few innocent people are executed if everything will be perfectly balanced later on?
And even if there is a system of perfect cosmic justice, there is no reason to simply assume that there exists a single, perfect god in charge of it all. Perhaps there are committees of gods who do the work. Or perhaps there are laws of cosmic justice which work like laws of gravity something akin to the Hindu and Buddhist concepts of karma.
Thus we can see not only that the basic premise of this argument is faulty, but that even if it were true, it fails to necessitate the conclusion theists seek. In fact, believing it may have unfortunate social consequences, even if it is psychologically appealing. For these reasons, it fails to offer a rational basis for theism.