"Influence" is another nebulous term. Some religious faiths in the US considered those with dark skin to have been marked and cursed by God to a life of subjugation. This faith has certainly historically lead to racially biased laws and racially biased justice system. (Eg, slavery in the US, but also institutionalized racism like redlining carried out by the Federal Housing Administration.)
The Anti-Drug Abuse Act of 1986, which raised the penalties on the crack to be much 100x higher than that of non-crack cocaine, strongly disproportionally affected black Americans. Part of the reasoning behind the Act was to help the black communities ravaged by drug use, but a larger part of it was the ratcheting up of the War on Drugs. This War has its roots in racist viewpoints of the early 1900s. Anslinger, one of the early high officials in that "war" is often quoted as saying:
> “There are 100,000 total marijuana smokers in the US, and most are Negroes, Hispanics, Filipinos, and entertainers. Their Satanic music, jazz, and swing, result from marijuana use. This marijuana causes white women to seek sexual relations with Negroes, entertainers, and any others … the primary reason to outlaw marijuana is its effect on the degenerate races… Marijuana is an addictive drug which produces in its users insanity, criminality, and death … Reefer makes darkies think they’re as good as white men. ”Marihuana leads to pacifism and communist brainwashing … You smoke a joint and you’re likely to kill your brother … Marijuana is the most violence-causing drug in the history of mankind.”
With "Their Satanic music" it's not hard to infer that there is a religious influence, though it's only one of many influences in that quote.
In short, a question of "whether these sentencing laws are influenced by religion" can be easily be answered "yes".
Then again, I could also find people who use religion to argue for reducing the severity of these laws.
Sometimes I wonder whether these sentencing laws are influenced by religion.