Everyone will be off the ship by 8:30/9:00 am latest. You can store your luggage at the train staion in Barcelona whilst you sightse.
The ship likes to clear passengers to prepare for the following cruise.
However, no matter what colour disembarkation tag you are given, it is usually possible to change this time by speaking with guest relations.
We had an evening flight from Barcelona and decided to run the risk of leaving luggage at the airport and returning into the city for a day's sightseeing. This worked very well for us as the airline checked in our bags until the evening flight.
Some airport check in clerks may not be quite so accommodating however, but I understand that there are still some 'left luggage' facilities at the airport.
Perhaps you could check Barcelona's airport website or even email them. This question must be frequently asked.
Barcelona has an excellent underground system, easy to use and the journey to the airport is around 20-40 minutes (can't quite remember exactly, but it's fairly brief).