To explain, God in this context means for the Gods, Buddhas Dao`s, and so on that each religion/spiritual path teaches us about.
So to the topic: The way I see it, is that it is not the Gods who are the guilty once in human sufferings, it is our own fault that we suffer, and it is only by our own action we can end the suffering we feeling. So no matter if you are a spiritual/religious person or a non-believer it is by your own fault from the past that you feel some kind of unpleasant feelings or actually suffer more deeply.
God is the one who gives us the path to freedom, but the path itself is not without suffering, it is the suffering that gives us the realization that we are on the path to something better. Did that sound totally opposite of what you expected? I am sure it did. To become better we must first suffer for our own wrongdoings in the past, we must learn why we suffer, only then can we undo the things we did in the past and stop doing them.
So in my understanding, it is not God who punishes us, it is our own action, speech, and thoughts that have made us suffer.
If others are bugging you or harras you, actually you are the cause of it your self, eve you can not see it at the time. (this is the part called Karma)
These is only my thoughts about it, so do not think that I say I have the full answer to it, I do not.
What is your thought about this?