First, try to stop in time so that you don't have to set up in the rain.
Second, I have all my tent/sleeping stuff in a pack on the back rack
So I can set up in two or three minutes.
Third, if you are in a developed campground there are often picnic pavillions.
You can either chill out there until the rain lets up,
Or, if you have a free standing tent, set it up and carry it to the campsite with the fly on.
Depending on where you are touring, how remote it is, and how cold -
It is never a good idea to get soaked, esp. if you might have a few days of rain.
Sometimes it pays to get a room - and you should plan for the expense.
It beats being cold, wet, and miserable - and then getting crotch rot.