It's wrong to discriminate against someone based on what you assume they believe, which usually turns out to be the case in situations of discrimination.
It is wrong to discriminate against a Christian (for an example) because when you hear of which religion he/she follows, you assume that they are a hardcore Evangelical who is homophobic. That's why there are laws against that. Besides, religion is usually indoctrinated since childhood, sometimes involving instilling fear and shame it isn't the same as so many other choices that people make.