Who wrote the Bible? The short answer is: God, through people. I’ll get back to that point.
The long answer would take more time than you probably want to spend right now. So here’s a summary:
The Bible was written by lots of different people over many centuries, from about the 9th or 10th centuries BCE to the 1st century CE. These people included priests and scribes, prophets and singers, ordinary Israelites and maybe even a king or two; probably mostly men, but perhaps a woman here and there (see A psalm is a song of praise. In the Old Testament 150 psalms comprise the psalter, although some of the psalms are laments and thanksgivings. In the New Testament early Christians gathered to sing psalms and hymns and spiritual songs.... More 131). They were believers and skeptics, saints and sinners, but somehow all of them were caught up in the extraordinary story of God’s love for the world, and God’s desire to bless and redeem it, through Israel and through Israel’s The Messiah was the one who, it was believed, would come to free the people of Israel from bondage and exile. In Jewish thought the Messiah is the anticipated one who will come, as prophesied by Isaiah. In Christian thought Jesus of Nazareth is identified... More.
The Bible is not, of course, a monolithic work (like, say, Homer’s Iliad). It is a collection of books; a library, you might say. So it’s easier to answer questions about authorship for individual books or sections of the Bible — questions like, “Who wrote the The Pentateuch is a Christian term the first five books of the Old Testament. These books contain stories of Israel's early history, God's covenants, and many laws such as the Ten Commandments).... More?” — than it is to answer the question, “Who wrote the Bible?”
Just as examples, let’s take two parts of the Bible, one from the Old Testament and one from the New Testament. If you want to go into more depth about authorship of individual books of the Bible, scroll down to the “Who Wrote It” heading near the end of each book’s Summary tab.
AN EXAMPLE: THE PENTATEUCH
Let’s talk first about authorship for the first major section of the Bible. The Pentateuch (Genesis, Exodus, Leviticus, Numbers, and Deuteronomy) is a part of the Bible that Jewish and Christian traditions say was written by Prophet who led Israel out of Egypt to the Promised Land and received the law at Sinai... More. The Pentateuch itself does not make that claim, though the book of Deuteronomy is said to contain sermons of Moses.
One problem with the claim that Moses wrote the Pentateuch is that the end of the Pentateuch (Deut. 34) describes Moses’ death, and it’s hard to write when you’re dead.
Another problem is that the Pentateuch seems to speak with more than one voice. There’s lots of different material there (narratives, genealogies, laws, poetry), and some parts seem to contradict other parts. For instance, Gen. 1 says that God created everything in the natural world (including animals and plants) first, and then created human beings. Gen. 2 says that God created a human being first, and then created the plants and the animals. If Moses wrote the whole Pentateuch, one would think he would have tried not to contradict himself.
Lots of people over the centuries have noticed these issues and others in the Pentateuch. But it wasn’t until a little more than a hundred years ago that scholars came to something of a consensus about the Pentateuch’s authors, one that still holds sway even now.
That is, biblical scholars argued that the Pentateuch was made up of different “sources.” These source documents were written by individuals or groups of people whose contributions were combined over the centuries and edited finally (in the 6th or 5th centuries BCE) into the form of the Pentateuch we have now.
The classic form of this theory (called the Documentary Hypothesis) discerned four sources, abbreviated with the letters JEPD. The J source was written by the Yahwist, who used the divine name Yahweh in his writings. The Elohist (E) used the name Elohim for God. The Priestly source (P) came out of the priestly class in Israel; and the Deuteronomist (D) was responsible primarily for the book of Deuteronomy (and was also responsible for, or at least influenced, the books of Joshua through 2 Kings. But that’s another story).
Confused yet? I’ve only skimmed the surface. There’s more. For instance, though scholars date the oldest of these sources to the 9th or 10th centuries BCE, when Israel was settled in the land, they undoubtedly contain older material, stories and poems that were passed down orally for a long time before they were written down.
The Documentary Hypothesis is still accepted by most modern biblical scholars in one form or another, but there are lots of arguments over its details. The main point is this: The Pentateuch is the work of many different hands, and it was written and compiled over the course of centuries. To borrow a wordplay from other scholars, the Pentateuch is not so much Mosaic (i.e., written by Moses) as it is a mosaic (a unified work made up of different parts).
ANOTHER EXAMPLE: PAUL’S EPISTLES
Let’s look at another example, this time from the New Testament. The Epistles are, as their name says, letters, written to various churches in the first century after Jesus is the Messiah whose life, death, and resurrection are God's saving act for humanity... More. Many of the epistles in the New Testament were written by Paul of Tarsus (a.k.a. St. A Christian missionary who once persecuted the church... More, the Derived from a Greek word meaning "one who is sent," an apostle is a person who embraces and advocates another person's idea or beliefs. At the beginning of his ministry Jesus called twelve apostles to follow and serve him. Paul became an apostle of Jesus... More Paul).
Thirteen of the 27 books of the New Testament carry Paul’s name. (See, for instance, the long greeting in Romans 1:1-7 — “Paul, a servant of Jesus Christ … to all God’s beloved in Rome.”) Of those 13, the books that all scholars agree were written by Paul are Romans, 1 Corinthians, 2 Corinthians, Galatians, Philippians, 1 Thessalonians, and Philemon. These letters were written to churches or individuals (Philemon) to address specific theological and ethical questions that had arisen in those communities, to convey Paul’s affection for (Philippians) and/or anger with (Galatians) those communities, and (most important) to proclaim the Gospel of Jesus Christ to them.
Paul sent these letters to the churches. They were read aloud, then copied and distributed and eventually collected, along with other letters and books that were deemed edifying for the young Christian church, into what became the New Testament.
Some of the other epistles in the New Testament bear Paul’s name, but many (not all) scholars think they were written by followers of Paul after his death. These books (Ephesians, Colossians, 2 Thessalonians, 1 Timothy, 2 Timothy, and Titus) don’t have the same vocabulary or style as Paul’s other letters and some seem to reflect concerns of the generation or two after Paul.
It’s important to note that the idea of authorship in this period was not what we hold today. To write in someone else’s name was not considered false advertising. Instead, the followers of Paul (if, indeed, they wrote the “deutero-Pauline” epistles) were continuing Paul’s mission and addressing new situations that arose after his death. In any case, other Epistles do not even identify their authors (see Hebrews, 1 John, 2 John and 3 John), and we can only guess at their identities. In other words, the Epistles, like the Pentateuch, are the work of several people, some of whom we can identify (Paul), some of whom we can’t.
BACK TO THE BEGINNING
I said at the beginning of this essay that the answer to “Who wrote the Bible?” is “God, through people.” Both parts of that answer are important.
I’ve already talked about the “people” part of the answer. Many different people over the course of centuries wrote the books that together became the Bible. We know the names of some of those people (Isaiah, son of Amoz, who prophesied in Jerusalem, is included among the prophets of the eighth century B.C.E. (along with Amos, Hosea, and Micah)--preachers who boldly proclaimed God's word of judgment against the economic, social, and religious disorders of their time.... More, Prophet who condemned Judah's infidelity to God, warned of Babylonian conquest, and promised a new covenant... More, Paul), but not all of them. We know, or can guess, when some of them lived; for other authors, we have no clue.
Whoever they were, they were moved to write about their encounters with the God of Israel, the God whom we know most fully in Jesus, in order that others would come to believe in that God (John 20:31). Whoever they were, their writings continue to speak to us, their descendants in the faith, in ways that are transformational. Indeed, their writings have been foundational for countless believers and communities of faith over the centuries.
And that’s where the “God” part of my answer comes in.
“THANKS BE TO GOD!”
We who hold these texts as Scripture believe that somehow in the midst of the writing and compiling and editing of these books, God was at work. We use words like “inspiration” or “revelation” to talk about God’s work in this process. And by that, we mean that the Holy is a term that originally meant set apart for the worship or service of God. While the term may refer to people, objects, time, or places, holiness in Judaism and Christianity primarily denotes the realm of the divine... More Spirit was at work in and with the writers and editors of the Bible, whoever they were and whenever they lived.
Just as importantly, we trust that the Holy Spirit continues to be at work in those who hear and respond to these ancient texts, including us. When we call the Bible “the Word of God,” we mean (at least in part) that it is a living Word, able to speak to new generations and new situations in ways that are life-giving and faithful.
Who wrote the Bible? Finding answers to that question has occupied biblical scholars for generations, and it is a worthy endeavor, as it gives us insights into the contexts and people and history that gave rise to these foundational texts of our faith. But in another way, perhaps we already know the answer to that question whenever we respond to a Scripture reading in worship with the words, “The Word of the Lord.” “Thanks be to God!”
 For much more detail about the Documentary Hypothesis, see Richard Elliott Friedman’s Who Wrote the Bible? (2nd ed., HarperCollins, 1997). Friedman goes into great detail about the case for the hypothesis, and makes strong arguments for the dating of the various sources of the Pentateuch.