Sería: "Dios, ¿por qué me castigas/estás castigando?"
Something similar that can be said in my country (I don't know if in other countries too): "¿Qué estaré pagando?" (What am I paying for?) meaning something bad or unpleasant happened to me and that must be a punishment or "payment" for a sin I committed.
In Russian, when a mother is angry with her child, she may exclaim dramatically, "О Господи! За что мне такое наказание?" (literally "Oh Lord, why is such a punishment for me?") And it's more like a rhetoric expression of frustration, nothing more.
But if someone is going through some really difficult times (with ilnesses, deaths in the family or any other ordeals), the phrase will sound slightly different, "За что ты наказываешь/караешь меня, Господи?" (what are you punishing me for, oh Lord?)
Basically, there is no difference in meaning; it is just one of those nuances that are present in every language and are often hard to explain logically.
"Een straf van God" [punishment of/ by God] sounds somewhat familiar but is uncommon, as far I can see. I cannot imagine anything religious except for: "Waar heb ik dat verdiend?" [Lit. Where(fore ?) did I deserve this?What did I do to deserve this?] Of course that is when the worst happens, not the best...