Believing in a god allows you to stop having to think for yourself, and let others ( priests, scripture-writers, dogmatists) do your thinking for you. Thinking is often quite hard to do, and it is easier not to do it.
If your god comes with an afterlife, you have the consolation of believing that you will see your dead loved-ones again, and that death is not the end. If you have suffered and you know an evil person who has prospered, you believe that justice will be done in the next world. That makes the suffering a bit easier.
Also, gods of the modern world are male, which means that maleness implies superiority, so men can give themselves power over women and make women do the ( unpleasant, badly paid) work that they ( the men) don't want to do.