Yes. In Costa Rica, you need to have your passport with you if you are in a vehicle, because the police can ask for it. They want to know you are legal in the Country and do not extend the 90 days that are allowed with a tourist visa.
If you prefer not to bring your passport on a tour, bring at least a printed copy of the page that has your picture plus the page that shoes the stamp of your last entry in the Country.
Another important reason why we ask that you bring your passport is in case of any emergency. If you need to go to the hospital, you will need your passport.
If you go to restaurants, hotels or any shops and want to pay with your credit card, you may be ask to show your passport as a proof of identity, other IDs may not be accepted.