Sex before marriage is repeatedly condemned in the Bible. Some examples are given below.
Exodus 22:16-17: a man had to marry the woman with whom he had premarital sex, if the father approved of the marriage, or pay a high price.
Deuteronomy 22:13-21: under the Law of Moses the expectation was that a woman would be a virgin until she was married.
1 Corinthians 7:9: Paul advises engaged couples “But if they cannot exercise self-control, they should marry. For it is better to marry than to burn with passion.”
2 Corinthians 11:2: Although this passage is talking about Christ and his church, it uses the analogy of a man receiving his bride “as a pure virgin”. There are dozens of other verses speaking about a “virgin” as a cherished state and the standard for God’s people.
Sex was designed by God for marriage, and all forms of sexual activity outside marriage are condemned in the Bible as “sexual immorality” (e.g., Acts 15:20; 1 Corinthians 5:1; 6:13,18; 10:8; Galatians 5:19; Ephesians 5:3; Colossians 3:5; 1 Thessalonians 4:3; Jude 7). Pre-marital sex is included under this label (as is evident from the verses cited above).
The Bible promotes abstinence before marriage as the standard of godliness. This is not because God wants to spoil our fun. It is because sexual relations work much better in committed relationships. First, sex acts as a kind of glue to help married people stay committed to each other for life, but this only works if both partners are faithful to one another. Second, if sex leads to children, it is much better for the children to have a stable and committed family environment.