In most European countries, you have to be able to identify yourself if challenged. If you carry some other basic ID with you (i.e. a driver's licence), then a passport copy should be sufficient.
However, the question is whether your passport will be more secure at the hostel than on your person. At some places I've stayed at, leaving the passport at the hostel (even if individual "lockers" were provided), would have been an invitation for it to be stolen.