Generally speaking, increased religiosity is associated with more conservative (and often negative) attitudes about sex. But, there is huge variation within religions when it comes to attitudes towards sex. As an example, Rev Bev is an ordained clergy in the Christian Church (Disciples of Christ) who offers very sex positive sex advice and information (check out her website here). This is a clip of her discussing BDSM:
You can check out the rest of her video clips on her YouTube channel, here. Apparently, there is no topic she is not willing to discuss.