Who decided what would be in the bible?

The 'canon' is a term that refers to the ‘standard,’ or ‘rule.’ The early church fathers, in an effort to preserve the integrity of the ancient writings and the doctrines of the Church, 'canonized' the books that were recognized as 'inspired' by God. When the writings were ‘canonized,’ this simply means that the church accepted them as the ‘official’ documents that were prescribed by God. It is important to realize that they were not simply ‘appointed’ as official, but that they had been recognized for some time by the majority of the Church at the time as the inspired word of God and used as such. The canon simply documents this recognition.
The Old Testament was known (essentially) as three 'books', the Law
(Genesis to Deuteronomy), the Prophets (Joshua through 2 Kings, Isaiah,
Jeremiah, Ezekiel and the 12 'minor' prophets), and the Writings (the
remainder of the OT books.) These books were confirmed by
Christ and the early Church fathers as they referred to them with
comments such as 'It is written' or 'God says...'. The
discovery of the Dead Sea Scrolls included every book of the Old
Testament except Esther, indicating an acceptance of them as scripture
from the first Century A.D.
Generically, the New Testament canon includes those writings which were
most universally accepted by the majority of the early
church. The most controversial (those which were adhered to
by a few sects, but not a majority) were eventually culled out of the
official 'list'. Several books, including Revelation, James,
Jude, 2 Peter, 2 and 3 John, were included by the end of the second
century.
Four key questions were considered by the Council Of Carthage (397
A.D.) that declared the official canon of the New Testament church:
1) Is the writing Apostolic? If an Apostle either was
credited with authorship, or with direct influence (as with Mark and
Luke) the canonicity was generally assumed. This is not a
rigid requirement; for example, the book of Hebrews' authorship is
still under question.
2) Is the writing Orthodox? If the writings conform
with the early understandings of the faith, and do not obviously
contradict another accepted canonical writing, it is generally accepted.
3) Is the writing universal? Writings that seem
specific to a certain group, and apparently not intended for the Church
as a whole were generally not considered to be appropriate to a canon
of the Universal Church.
4) Has the writing had influence over the Church over
time? The proven ability for the writing to provide guidance,
sustenance and inspiration for the Church is expected.
Understanding these requirements show that the writings were not simply
'chosen', but proven to be inspired by their 'intrinsic authority and
constant usage.' (Adapted from Zondervan's Handbook To The
Bible.)
What About The 'Apocrypha'?
Even after the official canonization, there was some debate going
on. In ~385 A.D., the ancient Church father Jerome developed
a version of the Bible that included the books of the Apocrypha,
although he later disavowed them as canonical, in his 'Vulgate'
Bible. In 1545 the Council of Trent declared the Vulgate
Bible the official Bible of the Roman Catholic Church. The
protestant movement sided with Jerome, who by then had separated the
Apocrypha from the remainder.