I'd recommend booking well ahead for national parks unless you're riding in the shoulder season, then you might be all right. Rowan and I were able to find camping locations on a tour we did in the Rockies in late August.
I'd also recommend booking a couple weeks in advance if you're planning to be at a campground on a weekend ... and maybe a month in advance if you're planning to be at a campground on a long weekend.
So familiarise yourself with the long weekends in Canada and the US.
And if you're feeling a little bit uncertain, do a Google search for campgrounds a few days in advance, then email them or call them to find out if they've got spots. Their websites might also indicate if they are full or not.