ANSWER: Sex before marriage is usually discussed along with other forms of adultery in the Bible. Jesus gave us the clearest spiritual, as well as physical, application of God's Commandment to refrain from participating in sexual activity with another person outside of marriage when he stated we are not even to LUST after another person in our hearts. Doing so, according to Christ, is the same as adultery (Matthew 5:28)
In the Old Testament, women were never permitted to be close enough to any male until they were betrothed and then only under chaperoned conditions. Sex before taking the vows of marriage was not permitted; doing otherwise came with penalties - some of which were severe. A betrothed woman was legally bound to her future husband even if she had never met him - so if another male took her virginity she was considered immoral and could be stoned to death for adultery along with the male. If an woman not betrothed and a single man had a sexual relationship, the man was to pay the woman's family a certain amount of money and was forced to marry her - and never be able to divorce her (Deuteronomy 22:28 - 29).
God promises blessing to his people when they obey Him and do not sin. This includes refrain from intercourse before marriage. When we do not commit adultery, we are protected from a variety of things in this world such as diseases related to illicit sex, unhappy relationships, divorce, and unwanted pregnancies to name just a few.
There are several reasons why God gave humans a drive to procreate. One of the most important is to insure not only that the human race continues, but that God ultimately has BILLIONS of potential beings who can ultimately become his spiritual children, be just like him, and live forever. Couples sleeping together that are not legally wedded, even with the best intentions, are putting themselves into a situation where it is easy to be tempted and sin. Humans were made with a DRIVE (and not a suggestion or simple desire) to have intercourse, primarily through hormones and other chemicals within the body. Couples who place themselves in such tempting environments are underestimating (or lying to themselves about) the power of this drive and how an 'innocent' situation can quickly turn into fornication.
The Apostle Paul was not kidding when he stated, in regard to immorality, that we should RUN AWAY from it as fast as we can (1Corinthians 6:18)! What was his solution to those who believe they might succumb to the temptation of having sex before marriage? It is better to take the vows of matrimony and not sin than to burn with lust and have our lack of self-control lead us into disobedience (1Corinthians 7:9).
We are placed in this world for the specific purpose of overcoming and developing a strong spiritual and Godly character within ourselves. God promises those that overcome will be called the Sons of God and we will live forever. We all fall short at some point. It is difficult to live a Godly life in our modern society. Christ, however, commands us to strive to be perfect as our heavenly Father is perfect.
While we are striving to live a more Godly life, he uses natural laws or principles to bless us because of our obedience. Those same principles or laws are a curse to us if we do not obey God. One good example of this principle is Africa. The AIDS epidemic is rampant there. There is, however, one place where the disease has not reached epidemic proportions. It is a place where they teach and practice what the Bible says about sex before marriage (and even outside of it).