I haven't gone on the journey yet, but like you I've been making plans for an upcoming trip. A lot of it depends on your time, budget, and goals. Here is what I found out:
If you are planning on spending several days at a time on the train, you might want to make a reservation ahead of time because the nicer, international trains tend to sell out during peak summer months. If you are planning on taking local trains for shorter distances, you probably don't need to buy every ticket before you leave home.
In Russia, train tickets go on sale 45 days in advance. However, in Mongolia, international tickets from U.B to Beijing can only be purchased a day or so in advance because the agents aren't sure how many berths are available.
Russia and China require visas for most nationalities. For the Chinese tourist visa (last time I checked) you needed to have either an invitation letter or proof of onward travel. The rest is pretty straightforward.
The Russian visa is a bit more complicated. I applied by myself in Shanghai, but you need a Chinese residence permit to do that. If you are applying in your home country, you could consider having an agent handle things for you. If you want to do it on your own, you need the following:
1. Your passport
2. A photocopy of the passport picture page
3. An extra passport photo
4. Proof of travel in and out of Russia (plane/train tickets, etc.)
5. An invitation letter
6. A photocopy of the invitation letter
7. *proof of hotel bookings
8. *proof of valid health insurance (they said it was required, but never looked at it)
9. The application and fees
Even if you are traveling independently, you will have to get an invitation letter through a tour company. We used Real Russia (www.realrussia.co.uk). It was easy and cost £15/person. You can even print it from your email (though some consulates require the original).
When you apply for the invitation letter you must list the cities you will be visiting along with each hotel/address. However, when I applied at the consulate, they never demanded to see further proof of where I would be staying. Regardless, it might be wise to make some reservations on Booking.com to bring with you. You can always cancel them later.
Like I said, I haven't actually done the trip yet...so hopefully my advice is sound! I think that once you have your visas, you are free to change your itinerary a bit, which would also give you more flexibility with buying tickets. So the answer is that you probably don't need to book everything in advance, but because of the length of the trip and the visa regulations you will definitely want to plan ahead. I hope that helps. Happy travels!