The Bible poses a real problem for Jews and Christians. In it, god commands the most awful things that we now would recoil in horror from doing. So what options do they have? The literalists say that god must have good reasons for making those commands, even if those reasons are elusive to us, and that we have to simply trust in his goodness.
Of course, that is a tough sell for the more sophisticated believers and some of them have taken the tack of trying to re-interpret the plain text of the Bible to suggest that it actually says things that are more benign or even good than what appears on the surface. One such apologia can be seen in the essay Are Biblical Laws About Homosexuality Eternal? by Richard Elliott Friedman and Shawna Dolansky, based on their book The Bible Now, where they tackle the highly problematical attitude of god towards homosexuality, which is turning out to be the Achilles' heel for Christianity and Judaism in America.
The essay itself is a fine example of the contortions one has to go through to salvage the idea that the Bible contains some moral value. Adam Kirsch of The New Republic reviewed the book and Jason Rosenhouse analyzed the essay and both come away unimpressed.
As Kirsch says, the Bible seems pretty clear about god's views on homosexuality.
Just look at Leviticus 20:13: "And if a man lie with mankind, as with womankind, both of them have committed abomination: they shall surely be put to death: their blood shall be upon them." The law as written does not apply to women, but for homosexual men it means death.
At this point, the twenty-first-century Jew—like the Protestant and the Catholic, anyone whose religion views the Bible as holy writ—has two simple choices, and one messy and unsatisfying one. The first simple choice is the one the Satmar Hasid would take: the Bible being God's word, homosexuality is ipso facto an abomination, Q.E.D. The second is the one any secular rationalist would take: the Bible is not God's word, and it has no more binding force than any other ancient Near Eastern law code. The Code of Hammurabi, for instance, holds that "If a man's wife be surprised with another man, both shall be tied and thrown into the water," but we are no more obligated to follow this law today than we are to follow Leviticus. Both reflect millennia-old views of gender and sexuality that now appear simply unjust.