In both of these slave rebellions, religion played a major role. In both cases, the men who led the rebellions (Turner and Vesey) were religious leaders among the African Americans in their communities. In both cases, the men felt that they had been ordered by God to resist slavery.
Denmark Vesey was a leader in the Hampstead African Methodist Episcopal (A.M.E.) Church, which was the only African American church in Charleston, South Carolina. He was not an ordained minister, but he did occasionally give sermons and teach religious classes for the church. Vesey believed that God had chosen him to lead his people out of slavery, just as Moses had done for the Israelites in the Bible.
Nat Turner lived on a plantation, not in the city. He did not belong to an official church in the way that Vesey did. However, he was a preacher who was widely noted among the slave communities of his area. He, too, felt that God had chosen him to be a leader. He felt that God wanted him to lead his fellow slaves in rebellion against the whites.
Thus, religion served as a major impetus for both of these rebellions.