As farouk said, it's a figure of speech. It means you are defending an opinion or stance you don't actually agree with (or totally disagree with), but you still do it for the sake of the argument, or for gaining a better understanding of the opposing view. It doesn't have to be a religion topic at all. You can be a devil's advocate in any kind of subject matter. I often catch myself doing that kind of thing in real life, because I love debating. So I hope it's not a sin of some sort, but I never really worried about it.
I can't remember any Bible passage about proper debate culture. It's probably just the word "devil" in it that makes you worry about that "game".
As far as I know the origin of that figure of speech was the canonisation process in the catholic church. In order to hear both sides some cleric had to speak against a certain saint candidate. That person would be the advocatus diaboli.
Now we could debate about what to think of the catholic canonisation process... but that's really just where the term comes from, the idea behind that kind of debate behaviour probably existed long before the cath church.