Constantine the Great called the First Council of Nicaea in AD 325, composed of 300 religious leaders. Three centuries after Jesus lived, this council was given the task of separating divinely inspired writings from those of questionable origin.

The actual compilation of the Bible was an incredibly complicated project that involved churchmen of many varying beliefs, in an atmosphere of dissension, jealousy, intolerance, persecution and bigotry.

At this time, the question of the divinity of Jesus had split the church into two factions. Constantine offered to make the little-known Christian sect the official state religion if the Christians would settle their differences. Apparently, he didn't particularly care what they believed in as long as they agreed upon a belief. By compiling a book of sacred writings, Constantine thought that the book would give authority to the new church.

More Info: en.wikipedia.org