Short thought and to the point on when bad things happen if it is a sign God’s punishment.
When Jesus was on the cross, God poured out all his wrath for sin upon His Son Jesus. Therefore the believer is legally forgiven and cannot be punished for their sin since Jesus bore the penalty on the cross.
Therefore, we may not know why something bad happens to us, but we can know what it CAN’T be! It can’t be that God is angry with us or punishing us because that issue was settled on the cross!
Then the issue becomes to understand according to James 1:5…