Are the aerodynamic benefits of winglets similar for both powered airplanes and (unpowered) gliders? (without considering fuel consumption of course)
Technically yes, but you have to consider that the benefits are weighted toward higher AOAs and lower indicated airspeeds, where the vortice flow is strong enough for the energy extraction benefit to exceed the winglet's own drag and weight penalty.
Generally this means airliners cruising above 30000 ft at low (relatively) indicated airspeeds, which is why 99% of the winglets you see are on high altitude jets, cruising at somewhere above or below 2x indicated stall speed (like say, 280 kts indicated, with a stall of around 140 kts indicated).
Lower altitude airplanes are generally cruising at a higher multiple of stall speed and lower AOA, where the drag of the winglet negates the benefit, which is why they are rare (but not unknown obviously) on straight wing airplanes (if they really did any good, you'd see them everywhere and STC shops would be selling winglet kits by the bushel for Cessna 172s and Piper Warriors).
Winglets on a glider can be a theoretical benefit to the extent the glider might gain L/D in the lower end of its speed range, but on the other hand, the winglet may be a net penalty in the high speed range, which can degrade the glider's penetration ability, so the overall benefit is a wash. I would say that's the reason that winglets are sometimes seen on gliders, but are also relatively uncommon.
Perhaps a better question might be swept wings vs straight wings.
Gliders gain efficiency through straight high Aspect Ratio wings that have relatively weak wingtip vortices, especially near the best glide AoA where they usually fly.
Swept wings benefit more from winglets because, while the bottom of the wing plows air outwards, air above the wing is pulled inwards, creating perfect conditions for a vortex to form near the wingtip.
This phenomena is evident as swept wingtips stall first at high AoA.
Lower aspect straight wings, especially bush planes, can benefit from winglets, which essentially act as end plates, increasing wing coefficient of lift at lower airspeeds.
Longer distance cruisers such as straight wing turboprops do without them, using traditional flaps and blown wings to do their business. Here the Hoerner wingtip can be applied rather than the winglet.
The thing to understand about winglets is that all they do is increase the effective aspect ratio of the wing. This has the effect of increasing the Oswald efficiency and reducing induced drag.
On an application such as a glider or a small general aviation aircraft, there is no need for such a device since the wingspan can just be increased to a greater effect (literally increase the aspect ratio) with about the same mass and stress penalty of a winglet. Obviously making your wing go up to trick the air into thinking it's wider is less effective than simply making the wing wider.
On large aircraft such as airliners, there are often wingspan constraints that prevent the use of certain taxiways and gates or require a costly upgrade to a larger gate. For this reason, winglets are added to make aircraft with fixed wingspans more efficient.
On a glider there is usually no such constraint so you don't see very many winglets.
I should add that some small aircraft, notably Learjets are rumored to have winglets because they look nice and sell more airplanes, not for any aerodynamic reasons.
A final note is that wingtip devices do not affect macroscopic flow patterns. More specifically, any flow straightening device will simply have a vortex form around it. You can read more in Boeing Tech Fellow Doug McLean's paper Wingtip Devices: What They Do and How They Do It.