I saw that some theses acknowledgements thanks God, so are there any rules or suggestions about that? Is it ok to do it for believers or just don't mention your religious affiliation in a scientific work?
There's nothing wrong with thanking God or other religious figures, and it's not particularly unusual. It could upset people if you use the acknowledgments as a place to expound religious doctrine, but no reasonable person would take offense at simply thanking God and I've never seen it cause any controversy.
Your acknowledgements are yours to do with as you see fit. Some might look at you a bit askance, particularly if your professed beliefs conflict with your research (e.g., a Jehovah's witness working on blood transfusions), but ultimately you can thank whoever or whatever you found helpful, whatever it might be.
I see no problem with this. A rabid atheist or differently-religious advisor or reviewer may be unhappy, but so may be a reviewer who is just going through a bitter divorce upon seeing an acknowledgement of a beloved spouse. No matter what you do, you can always inadvertently hit the wrong note.
As to suggestions, I'd say a discreet
(centered on its own page) can never be wrong.