Is it permissible to peel cucumbers or apples on Shabbat with a peeler?
The Shabbat prohibition of Borer forbids separating different objects that are mixed together, unless certain conditions are met. Namely, separating may be done if one removes the desirable object from the undesirable objects, and not vice versa; if this is for immediate purposes, and not in preparation for a later occasion, such as separating food in the morning to be eaten later for lunch; and the separation must be done by hand, and not with an instrument. All these three conditions must be met to permit separating on Shabbat.
However, according to a number of Halachic authorities, including Shemirat Shabbat Ke’hilchatah (Rav Yehoshua Neubert, 1927-2013) and Hacham Ovadia Yosef (in Kol Sinai), this prohibition does not apply to the removal of a peel that is attached to a fruit or vegetable. In their view, Borer refers to separating different items that are mixed together. In the case of an apple or cucumber, the peel and the food are attached to one another, not mixed. Removing the peel with a peeler is like cutting a piece off a fruit or vegetable, which is entirely permissible on Shabbat. This is quite different from the case discussed by the Talmud Yerushalmi of peeling an onion or garlic. The peels of onions and garlics are not attached to the food, and thus removing the peels would constitute Borer and thus be subject to the conditions listed above. In the case of produce such as apples and cucumbers, however, the peel is attached to the food, and its removal does not constitute Borer.
As such, it is permissible on Shabbat to peel an apple or cucumber with a peeler, even well before the food is going to be served. This is the ruling of Rav Shayo in his Mehkereh Eretz (4:64; listen to audio recording for precise citation).
Summary: It is permissible on Shabbat to peel foods like cucumbers and apples, whose peel is connected to the food. This may done even with a peeler and even many hours before the food will be served.