The Ammonites, who would be neighbors to the Israelites in Canaan worshiped the god, Molech. In this worship, they sacrificed their children to that god. Punishment for someone committing that gross evil was stoning to death. A person knowing about someone offering to Molech and failing to report his knowledge would be cut off from his people.
Severe punishment was prescribed for sexual immorality. The most severe was stoning to death for both individuals. Somewhat lesser penalties, but also severe were branding and in some cases, only being cut off from their people. Being cut off from their people meant that they were outcasts from God and country.
Mediums or fortune tellers were also to be stoned to death. God demanded that His people would not participate in the corrupt practices of their new land or of the countries around them but would follow Him only.