All religious "laws" were written by men, men who were "inspired by God" or Buddah, or whoever their ultimate being may have been, but not by God him/herself. People would do well to remember this point, because the men who wrote the scriptures were not perfect beings and their prejudices and ideas, as well as the times they lived in, are reflected in the scriptures they wrote.
I do think that, at its best, the Bible (the only one of the "inspired by God" books I've read, cover to cover), provides us with a set of rules that will improve our llives and lead us to be better people. But there is a lot of crap in the Bible too. It doesn't come out against slavery, and it can be used to justify murder (an eye for an eye), incest, war, and misogyny, so I think we have to choose wisely what we choose to follow in the scriptures.
For example, using the Bible to justify prejudice against gays, is really a stretch. If you are going to discriminate against other sinners, i.e. liars, thieves, adulterers, then you may have a point, but to single out one class of sinner and say "No, I won't serve you on religious grounds", rings false. Of course if you were to refuse to serve sinners, you wouldn't have any customers at all.