Judah got a wife for Er, his firstborn, and her name was Tamar. But Er, Judah’s firstborn, was wicked in the Lord’s sight; so the Lord put him to death. Then Judah said to Onan, “Sleep with your brother’s wife and fulfill your duty to her as a brother-in-law to raise up offspring for your brother.” But Onan knew that the child would not be his; so whenever he slept with his brother’s wife, he spilled his semen on the ground to keep from providing offspring for his brother. What he did was wicked in the Lord’s sight; so the Lord put him to death also. (Genesis 38:6-10)
Onan wasn't struck dead by the Lord for masturbating. His sin was refusing to ejaculate into the womb of his dead brother's wife. According to the law of Moses, if your brother died without fathering a son, it was your duty to get his widow pregnant:
If brothers are living together and one of them dies without a son, his widow must not marry outside the family. Her husband’s brother shall take her and marry her and fulfill the duty of a brother-in-law to her. The first son she bears shall carry on the name of the dead brother so that his name will not be blotted out from Israel. (Deuteronomy 25:5-6)
Onan didn't want to get his sister-in-law pregnant because the child would not be considered his, but rather his brother's. Of course, this commandment contradicts another commandment:
Do not have sexual relations with your brother’s wife; that would dishonor your brother. (Leviticus 18:16)
But hey, who ever said the Bible was consistent? So, if Onanism isn't really masturbation, does the Bible condemn masturbation anywhere? The closest the Bible comes is calling it unclean:
When a man has an emission of semen, he must bathe his whole body with water, and he will be unclean till evening. Any clothing or leather that has semen on it must be washed with water, and it will be unclean till evening. When a man has sexual relations with a woman and there is an emission of semen, both of them must bathe with water, and they will be unclean till evening. (Levitius 15:61-18)
Okay, so if a man masturbates, he's just got to take a shower, waiting until evening, and he's clean again. What does Jesus have to say about all of this?
But I tell you that anyone who looks at a woman lustfully has already committed adultery with her in his heart. If your right eye causes you to stumble, gouge it out and throw it away. It is better for you to lose one part of your body than for your whole body to be thrown into hell. (Matthew 5:28-29)
This is not technically a condemnation against masturbating. While looking at a woman lustfully can certainly lead to masturbation, it's not the masturbating that's the sin, but rather the looking.
So, in summary, masturbating is only a sin if you twist the words of the Bible. Some people consider masturbating a sin equal to abortion since you are preventing a life from being born. If this is so, masturbation is a sin only for men, not for women. But what does the Bible say about abortion?
While the Bible never specifically condemns abortion, it does use terms such as son, daughter, and baby when referring to an unborn child, so one could make the argument that a fetus was considered a person. For example, the fetus of John the Baptist leaps for joy in his mother Elizabeth's womb:
When Elizabeth heard Mary’s greeting, the baby leaped in her womb, and Elizabeth was filled with the Holy Spirit. In a loud voice she exclaimed: “Blessed are you among women, and blessed is the child you will bear! But why am I so favored, that the mother of my Lord should come to me? As soon as the sound of your greeting reached my ears, the baby in my womb leaped for joy. (Luke 1:41-44)
However, saying that the Bible forbids abortion because it refers to fetuses as babies is reading a lot into it. Just because mothers refer to their adult children as babies doesn't mean that they are literally infants. So too when a pregnant woman refers to her pregnancy as a baby.
Some people cite the Epistle of James which says, "The body without the spirit is dead." Since a fetus isn't dead, it must have a spirit and therefor killing it is murder. However, we can see that's not what James had in mind when we put the scripture in context:
As the body without the spirit is dead, so faith without deeds is dead. (James 2:26)
The point James is making is that belief without good deeds is not really faith, just as a body without spirit is not really alive. Here's another scripture that's not really about abortion but people twist around to make it seem like it is:
But be sure you do not eat the blood, because the blood is the life, and you must not eat the life with the meat. (Deuteronomy 12:23)
This little scripture simply means that eating rare meat is not kosher, however it's been interpreted in all sorts of different ways. Jehovah's witnesses interpret this to mean that blood transfusions are not allowed, while others think it condemns abortion. Since a fetus has a bloodstream at about four weeks and blood is the life, some think that getting an abortion after four weeks of pregnancy is murder. A character in the popular television program CSI quotes this scripture in a 2005 episode, although another character responds by telling him that the Pope in the 14th century said life doesn't begin until the mother feels the embryo move, which would be about the fourth month, long after four weeks.
So if we take the Bible at face value without trying to read our own modern day beliefs into it, what are we left with? The closest the Bible ever comes to discussing abortion is the follow passage:
If people are fighting and hit a pregnant woman and she has a miscarriage but there is no serious injury, the offender must be fined whatever the woman’s husband demands and the court allows. But if there is serious injury, you are to take life for life, eye for eye, tooth for tooth, hand for hand, foot for foot, burn for burn, wound for wound, bruise for bruise. (Exodus 21:22-25)
Causing a woman to lose a pregnancy demands a fine, but is not considered a serious injury. Killing a fetus does not demand a life for a life, so it was obviously not considered murder by the Bible.