Wow, this is a tough question, one which has been asked in one form or another for centuries. My initial response is that I am totally inadequate to answer it with any degree of accuracy. All I can do is to search the Scriptures and trust that the Holy Spirit will lead.
There are a number of other words besides “punish” that come into play here. We might want to also consider discipline, suffering, chastening, testing, and temptation. All of these words appear in Scripture and perhaps we need to differentiate between them.
The Old Testament particularly has references to punishment. In Exodus 20, when God is giving the Ten Commandments to Moses, He says, “I, the Lord your God, am a jealous God, punishing the children for the sin of the fathers to the third and fourth generation of those who hate me, but showing love to a thousand generations of those who love me and keep my commandments.” When the people worshipped the golden calf in Exodus 32, God says (v. 34), “When the time comes for me to punish, I will punish them for their sin.” Jeremiah prophesied concerning the upcoming exile of the Israelites into Babylon. In Jeremiah 21: 14, God says, “I will punish you as your deeds deserve”.
Do these references speak of punishment or discipline? We think of God as our loving and patient Father. A father disciplines his children because he loves them and doesn’t want to see them hurt. In Hebrews 12 we read, “My son, do not make light of the Lord’s discipline, and do not lose heart when He rebukes you, because the Lord disciplines those He loves, and he punishes everyone He accepts as a son. Endure hardship as discipline; God is treating you as a son. For what son is not disciplined by his father? If you are not disciplined (and everyone undergoes discipline), then you are illegitimate children and not true sons. Moreover, we have all had human fathers who disciplined us and we respected them for it. How much more should we submit to the Father of our spirits and live! Our fathers disciplined us for a little while as they thought best; but God disciplines us for our good, that we may share in His holiness. No discipline seems pleasant at the time, but painful. Later on, however, it produces a harvest of righteousness and peace for those who have been trained by it.” Then, in the third chapter of Revelation, the Lord is telling John what to write to the church in Laodicea; He says, “Those whom I love I rebuke and discipline.”
The word “punish” is a harsh word and is a Law-oriented word. The word appears a number of times in the Scriptures. However, Scripture also tells us the good news of the Gospel. For example, notice how the passage from Exodus 20 quoted above has an announcement of God’s grace right after the Law message. The entire Bible is a means by which God makes His plan of salvation known to Jews and Gentiles alike. Salvation comes by God’s grace through faith. His grace takes the place of the punishment we deserve. When Christ died on the cross, He took all the sins of the world – past, present, and future – upon Himself. He bore the punishment that we deserve. God is still our loving Father and He hates our sins, but the punishment has been taken care of. He sees only the righteousness of Christ when He looks at us.
That doesn’t mean that we are sinless – far from it. We are subject to God’s discipline so that we might be brought closer to Him. We need to remember that sin is a constant in our lives while we are yet on this earth (Romans 3:10, 23). So, we not only have to deal with God’s discipline for our disobedience, but we also have to deal with the earthly consequences resulting from sin. If a believer steals something, but then repents, God will forgive him and cleanse him from the sin of theft, restoring fellowship between Himself and the repentant thief. However, the societal consequences of theft can be severe, resulting in fines and jail time. These are natural consequences of sin and must be endured. But God works even through those to increase our faith and glorify Himself.
In this earthly life, we experience suffering. Some people suffer beyond our comprehension. Are they being punished? Does God cause events such as 9-11, or Hurricane Katrina, or the earthquake in Haiti, or the horrendous crimes that people commit against each other? Suffering is hard to understand because it affects “good” people and “bad” people, Christians and unbelievers. In the Bible, Job suffered terribly, but did God bring on or cause the suffering? If we read the book of Job, we see that God did not cause Job’s suffering, but He allowed the devil to cause pain and suffering to Job. He also put limits on what the devil could do; thus God remained in control. He allowed Job to be tested, to be tempted, and to suffer. In New Testament times, Christians suffered terribly at the hands of the Romans. Christ took Job’s sins, the Christian martyr’s sins, and our sins upon Himself and bore our punishment. This is a core belief. Therefore it follows that our suffering and the suffering of others must have a purpose beyond punishment.
We cannot know or understand the mind of God, but we know from His Word that He loves us and wants us to be with Him forever. He disciplines us for our good. I think a passage that sums up this concept is Romans 5: 1-5, “Therefore, since we have been justified through faith, we have peace with God through our Lord Jesus Christ, through whom we have gained access by faith into this grace in which we now stand. And we rejoice in hope of the glory of God. Not only so, but we also rejoice in our sufferings, because we know that suffering produces perseverance, perseverance, character, and character, hope. And hope does not disappoint us, because God has poured out His love into our hearts by the Holy Spirit, whom He has given us.”
So, although this falls short of being a complete and perfect answer to your question, my hope is that you may find comfort in two additional passages from God’s Word. First, when Moses was about to die and he was turning the leadership of the Israelites over to Joshua, he said, “Be strong and courageous. Do not be afraid or terrified because of them (the heathens who inhabited the Promised Land), for the Lord your God goes with you; He will never leave you nor forsake you.” (Deuteronomy 31: 6). Then, in the New Testament, Paul says to the Christians in Corinth, “No temptation has seized you except what is common to man. And God is faithful; He will not let you be tempted beyond what you can bear. But when you are tempted, He will also provide a way out so that you can stand up under it.” (I Corinthians 10: 13-14).