For some port stops, some ships will recommend you take a photo ID with you, which can be your passport or your driver's license. I usually opt to leave my passport in the safe and use my license. It's also a good idea to make a photocopy of the picture page of your passport, and keep that with you when you leave the ship.
There are some European ports that require that you take your passport with you. Check your cruise information that's put in your room every evening, as it usually says somewhere on it what type of ID you need for the next day's port stop.