The switchover was in the 2nd to the 4th centuries. It was a double switchover: scroll to codex, but also papyrus to parchment. The Romans had been using wooden notebooks for a long time previously, which they called codices, and there are references in the 1st century poet Martial to books being published in codex form; but Martial makes it clear that they were a novelty at the time. In one epigram, Martial 14.192, he is impressed by a parchment codex edition of Ovid's Metamorphoses in a single volume:
Ovidi Metamorphosis in membranis
haec tibi multiplici quae structa est massa tabella,
carmina Nasonis quinque decemque gerit.
Ovid's Metamorphoses on skins
This bulk, which is built out of many-layered leaves,
holds fifteen books of Naso's poem.
Lionel Casson, Libraries in the Ancient World (Yale, 2001) pp. 127-8 reports the following proportions in Egyptian manuscript finds:
| Codex | Scroll
---|---|---- 1st-2nd centuries CE | 1.5% | 98.5% ca. 300 | 50% | 50% ca. 400 | 80% | 20% ca. 500 | 90% | 10%
On the material: papyrus had had the merits of being fairly tough, cheap, and it's extensible: you could add on to the end of it indefinitely to make a single piece however long you wanted. Parchment was less easy to mass produce, but it had two main merits: first, it was much more durable still; and second, Egypt had a monopoly on papyrus because that was the only place it would grow in great quantity -- but parchment could be produced anywhere. (Within Egypt, papyrus continued to be more popular than parchment even after the switchover from scroll to codex. Incidentally, Casson believes that papyrus would have been the more common material for the codex outside Egypt too; I doubt that. Either way, it's Egypt that provides us with the most abundant evidence.)
And on the format: the reasons for the codex superceding the scroll are both cultural and practical. First, cultural: it is likely that early Christians provided a hefty push to the switchover. Books in any other genre showed a mix of scrolls and codices, but Christians adopted the codex virtually exclusively. Casson reports (pp. 129-30) that every Christian manuscript from the 1st-2nd centuries is from a codex. Compare that to the 1.5% for non-Christian texts. Casson thinks the Christians were motivated by wanting to make a break from Judaism; again, I don't really buy his interpretation, but it's possible. In any case, the rapid increase in Christian influence hastened the simultaneous spread of the codex.
Second, practical. While a scroll could be extended indefinitely, its utility decreased the longer it got; the codex has the obvious advantage that you can turn to the page you want very quickly. A single scroll containing the 15 books of Ovid's Metamorphoses would be unthinkable. In codex form it was bulky, as Martial points out, but still practical. A codex edition of a large work would therefore occupy a small fraction of the storage space. It was also possible to number the pages, making referencing easier for scholars. And Reynolds and Wilson, Scribes and Scholars (3rd ed., Oxford, 1991) p. 35, suggest that the codex may have been cheaper to produce.
I'm personally of the view that the switchover in the 2nd to the 4th centuries is by far the biggest culprit for the loss of nearly all ancient Greco-Roman texts. A new format attaches an extra cost to the survival of any text. But it also imposes a time-limit: if you're building your library to store codices, scrolls that haven't undergone a format-transfer by the deadline will simply not make it in to the library. I don't exactly regret the codex format, but there's certainly a big, a very big, downside to it.
Edit. moved a sentence from the end of the wrong paragraph to the end of the correct paragraph.
Edit 2. Oopsie on the table.