If I am flying the day of the cruise (which I don't do anymore unless absolutely necessary) then they go on at home and then checked to make sure they stayed on after the flight.
If I am flying in early I wait and do it at the hotel before going to the ship.
I follow Jim C.'s advice as well. I usually fly down the day before ,so I will attach the tags at the hotel.
One time I flew from Toronto to Seattle via Vancouver for an Alaskan Cruise. In Canada when we have connecting flight like that, we have to pick up our bags, go through US Customs (a few Canadian airports have US Customs clearance on site) and then re deposit on the conveyor.
I did not attach the tags, and my bags were misplaced. They had to be forwarded to the first port of call. Having the tags on the luggage would make it easier to get to the ship.