I've been reading Born Slaves, a summary of Martin Luther's book, The Bondage of the Will, that he published in 1525. This shortened version is published by Grace Publications Trust.
One of the observations he makes is remarkably topical. Here’s the gist ...
If you use human reason alone to consider the way God rules the world you have to conclude either that there is no God or that he is unjust. Bad people thrive and the good suffer. As Job says at one point, “Those who provoke God are secure” (Job 12:6).
Psalm 73 also picks up on this theme: “... I envied the arrogant when I saw the prosperity of the wicked. They have no struggles; their bodies are healthy and strong. They are free from the burdens common to man; they are not plagued by human ills. ... They say, ‘How can God know? Does the Most High have knowledge?’ This is what the wicked are like — always carefree, they increase in wealth. Surely in vain have I kept my heart pure; in vain have I washed my hands in innocence.”
So, many people deny the existence of God and say everything happens by chance.
The answer is that there is life after this life. Those things that are not punished and repaid here will be punished and repaid there. This life is a preparation for, or, better, a beginning of the life to come.
This issue is debated in every age but is only resolved by believing the gospel as it is found in the Bible.
On that coming day, God will reveal himself as a God who is perfectly and eternally just.