Below is a very good article written by Charles Holmes Jr. on the connection between the doctrine of justification and social justice. It was published via the Jude 3 Project:
The Justice of God
The doctrine of justification is a doctrine about our glorious salvation. It is an essential part of the message of the Bible. This doctrine, although is directly about Christ atoning for our sins, is foundationally built on the justice of God. God is an infinitely holy God, and there is nothing and no one on earth or in Heaven like Him (1 Samuel 2:2). God is a completely righteous God and can’t even look upon sin or have sin in His presence. When sin entered the world, we offended the rule and reign of God, and we followed our own way and trusted in our own ability for life and happiness. (Romans 1:22-23). For this reason, our disobedience to God must be punished eternally because our sin was against an infinite and holy God. God is a God of justice, so justice must be sought out by God for His glory (Psalm 89:14) in order for sin not to go without punishment. By the grace of God, God is not only a just God, but simultaneously a merciful and gracious God. All throughout the Bible God displays His mercy and justice as He intervenes in the world. The best display of this was on the cross where Jesus, the Son of God, went to bear the sin of world bringing justice to God, but also bringing mercy to a wicked people (1 Peter 2:24). As believers, because we have received the mercy of God and have seen the justice of God poured out on the person of Jesus, our understanding of justice should be shaped by this beautiful Gospel message.