It depends on the time of year you are traveling, and which cities you want to visit. If you travel in peak season, I would suggest to book ahead, and also cities like London and Amsterdam. I would book ahead.
If you travel outside of the season, and you really are flexible (so also don't mind traveling to another place, you can book while you are on the road. (a few days ahead, or maybe on the morning you are leaving a place.) Personally I think it causes more stress and headaches to don't book ahead, as I like to know where I am going. For me it would be too tempting to stay in one place much longer, and missing out on places, at the end of the trip.