ANSWER: In the gospels found in the Bible, we frequently find Jesus' statements, "it is written” referring to the Old Testament Scriptures. Jesus' quotation of Deuteronomy 8:3, during the time when he was tempted forty days by the devil, confirm the validity of the Old Testament Scriptures and who wrote it.
4 But Jesus answered, 'The scripture (bible) says, ‘Human beings (man) cannot live on bread alone, but need every word that God speaks' (Matthew 4:4)
The following is an even more powerful statement by Christ in Luke 24 when he said to his disciples, 'These are the very things I told you about while I was still with you: everything written about me in the Law of Moses, the writings of the prophets, and the Psalms had to come true' (Luke 24:44).
Concerning the authors of the various books of the Bible, it is widely known that Moses wrote the Torah, the first five books of God's word, and there is scriptural evidence of it:
25 When he (Moses) finished, he said to the Levitical priests, who were in charge of the Lord’s Covenant Box (the NKJV and other translation have 'the ark of the covenant'), 26 'Take this book of God’s Law and place it beside the Covenant Box (ark of the covenant) of the Lord your God, so that it will remain there as a witness against his people. ' (Deuteronomy 31:24 - 26, see also Exodus 24:4)
According to Jewish tradition, either Joshua or Ezra inserted, at the end of Deuteronomy, the account of Moses death. The book of Joshua bears his name because he wrote it. He continued where Moses' portion ended in the Book of the Law (Joshua 24:26). The book of Judges is generally attributed to Samuel, but it is a little unclear exactly when he authored it.
The authors of the two books of Samuel are not known with certainty. Some attributes them to the prophet Isaiah, while the Pelubert Bible Dictionary refers to different people, including Samuel himself (1Samuel 10:25), Nathan the prophet, Gad or Iddo the seer. This is the same situation for the books of 1 and 2Kings. The authors are not known for certainty. Chronicles are traditionally attributed by the Jews to Ezra, and probably correctly so, in spite of modern scholars that believe they were written at a time past Ezra.
Ezra and Nehemiah were written, at least in part, if not mostly, by the same persons. The book of Nehemiah, in particular bears evidence of his own authorship. From the first chapter on he speaks as the narrator of the stories written.
The authors of the books of Esther and Job are, of course, the people from whom the books are named. King David mostly authored the Psalms. The book of Proverbs was primarily penned by Solomon, who also composed Ecclesiastes and the Songs of Solomon.
It is understood that the prophets penned the books bearing their names.
How long did it take?
How long did it take to write the Old Testament, from the time of the first book to the authoring of its final chapter? The commonly held assumption is that Moses, who authored the first five books of the Bible (as far as their listing in our modern translations) known as the Pentateuch, was the first to pen words that would be considered scripture. This, however, is not true! Moses composed his books while the children of Israel wandered the wilderness for forty years, from 1445 to 1405 B.C. Job's book, however, can be dated to the 1660's B.C., at least TWO HUNDRED YEARS before Moses wrote anything! Malachi authored the last Old Testament book that came into existence (around 400 B.C.). This means it took roughly a little more than 1,200 years to write the only "Bible" available to the New Testament church.
For the New Testament books of the Bible, the gospels were written by two men who were Jesus’ first disciples (Matthew and John) and two who were not (Mark and Luke). Acts was written by Luke. The apostle Paul wrote at least thirteen books or epistles, such as Romans, Galatians, Ephesians, and so on, two books each sent to the church at Corinth, the church at Thessalonica, and to his closes friend Timothy. Paul almost certainly authored the book of Hebrews, making fourteen books total, although some scholars would contest his authorship. The remaining first century books were penned by Peter (2), John (4) and one of Jesus' physical brothers named Jude.