SparkNotes explains that in Act III of "The Crucible," John Proctor is put to the test when he decides he must confess to his affair with ringleader Abigail Williams. After being unjustly accused of witchcraft, he screams, "God is dead!" to show that if he is accused of witchcraft, there must not really be a God.
John Proctor, before the witchcraft accusations, was seen in the community of Salem as a holy and upright man. He falls from grace when he cheats on his wife with their servant girl, Abigail. He finally confesses to his wife, but he keeps his secret from others. When Abigail accuses Elizabeth of witchcraft, John decides he must confess to the affair to show that Abigail is not as angelic and honest as the town's judges believe she is. After Elizabeth lies, saying she does believe there was an affair because she thinks that guarantees her husband's good name, Mary Warren becomes frightened of Abigail and turns on Proctor. Warren accuses John of being a witch. Because the judges believe Mary Warren and Abigail over John Proctor, John shouts, "God is dead!" to show that if an upright man like himself is accused of witchcraft, anyone has the potential to be hanged for this unseen crime. Therefore, there is no justice and no God in Salem.