Religion is not the only, or the major source of values and ethics. Faith can lead to change, but it is not only faith in God. Whatever we have faith in is effective. Beliefs affect behavior. Anything we believe strongly can change behavior.
Beliefs are the source of the placebo effect.
People want, even need, to believe in something beyond themselves and the visible world to give meaning to life and hope for something after this life. Prayer is not answered by God, but by those who pray. Religion is the source of many good things - art, music, literature. But it is also the source of much that is bad - wars, persecution, prejudice, discrimination and denial of freedom and rights. While there is no convincing evidence for the existence of God, belief in God can be a positive influence in a person's life.