Kant argues that God - "God" being understood as the moral judge - is needed to explain the rationality of moral behavior. Kant rejects theoretical arguments, but accepts a proof of God on practical grounds.
1. Moral behavior is rational.
2. Moral behavior is rational only if justice will be done.
3. Justice will be done only if God exists.
4. Therefore, God exists.
We might just take (1) for granted in order to focus our attention on its theological implications. Part of what makes moral behavior rational is accountability. Without it, all have the same fate. All of us will die, and in the end it ultimately won't matter how we live our lives. Yet, we clearly do recognize the rationality of moral behavior, and given that a necessary condition of its rationality is the guarantee of justice, we have a good pragmatic reason to accept premises (1) and (2).
As for (3), God is here understood as the determining factor in the application of justice. This makes sense given the traditional view of God as the greatest conceivable being. A perfect being would administer justice perfectly. Without God, and hence without a determining factor in the application of justice, there is no guarantee of justice. However, this is contrary to the conjunction of premises (1) and (2).
Therefore, God exists.
One objection to this argument I often hear is a brand of the old regress question: "If God determines justice for everyone, who determines justice for God?" This is much like the fallacious assumption that if God created the universe, then God must also be in need of a creator.
The reason the question is inapplicable to God is because God is not the type of being in need of the administration of justice. God is simply the greatest conceivable being. We might formulate this response like this:
5. Only beings that can err are in need of the administration of justice.
6. God is the greatest conceivable being.
7. The greatest conceivable being cannot err.
8. Therefore, God is not in need of the administration of justice.
The argument is clearly valid; so if its premises are correct, then the conclusion necessarily follows. The regress problem is thereby solved.