The author of Hebrews speaks at length regarding God's punishment of sin, even for believers. We find in Hebrews 12:5-11:
Does God punish sin? Does God punish Christians who sin?
And have you forgotten the exhortation that addresses you as sons? "My son, do not regard lightly the discipline of the Lord, nor be weary when reproved by him. For the Lord disciplines the one he loves, and chastises every son whom he receives." It is for discipline that you have to endure. God is treating you as sons. For what son is there whom his father does not discipline? If you are left without discipline, in which all have participated, then you are illegitimate children and not sons. Besides this, we have had earthly fathers who disciplined us and we respected them. Shall we not much more be subject to the Father of spirits and live? For they disciplined us for a short time as it seemed best to them, but he disciplines us for our good, that we may share his holiness. For the moment all discipline seems painful rather than pleasant, but later it yields the peaceful fruit of righteousness to those who have been trained by it.
In this context, punishment (here called discipline) is a positive corrective by a loving heavenly Father. Believers are viewed as God's children, not to be hated or despised, but rather disciplined in love.
Proverbs 3:11-12 likewise notes, "My son, do not despise the LORD's discipline or be weary of his reproof, for the LORD reproves him whom he loves, as a father the son in whom he delights." This discipline is a sign of God's love, not His desire to harm.
The goals of God's discipline are to help us grow to maturity and learn to honor the Lord with our lives. First Peter 1:14-16 teaches, "As obedient children, do not be conformed to the passions of your former ignorance, but as he who called you is holy, you also be holy in all your conduct, since it is written, 'You shall be holy, for I am holy.'"
For unbelievers, a different type of punishment ultimately takes place after this life. As Luke 16:19-31 reveals, those without faith in Christ are separated from God forever and exist in eternal punishment. Though God has provided a way for humanity to receive salvation and spend eternity in His presence (John 3:16; Ephesians 2:8-9), not all will accept His salvation.
In addition to godly discipline for the sins of believers and eternal punishment of unbelievers, there are times when God has judged individuals and groups in very graphic ways due to sin. The Old Testament records many national judgments due to the sins of Israel or of surrounding nations. God may choose to provide such judgments still today, though believers should be hesitant to make connections with modern calamities as God's judgment since the reasons behind such tragedies is unknown.
Ultimately, all of God's punishments are just as He is holy and righteous and is the only One able to judge perfectly. Believers can live confident of God's presence as a loving Father who disciplines to help us and will provide perfect justice in the afterlife.
The consequences of sin - What are they?
Does my private, personal sin affect others?
Are all sins equal?
Is eternal security a license to sin?
What is sanctification?
Truth about God