Of course it depends on many factors, but for high aspect ratio wings, as used on commercial transports for example, the most commonly used shape is probably the Z section, at least for metallic structures. It is good because it has good bending stiffness (moment of inertia) and also has good access for attaching it to the skin.
A "C" and a "Z" with the same dimensions would have the same moment of inertia, but the C would be harder to attach because the outstanding flange would get in the way of the tool, whereas the flange on a Z is turned in the opposite direction giving better access for the tool.
A simple angle could be used, but is inefficient due to having a lower moment of inertia. Therefore, when angles are used, they are usually in the form of an extrusion with a "bulb" at the free edge to stabilize it as well to add some moment of inertia.
A "hat" often shows up as best when analytical trade studies are performed. The have good moment of inertia and they reduce the space between stiffeners, giving more support to the skin. But for metals, a big disadvantage is that there is a hidden area within the hat where corrosion and cracks could occur and be hard to find during inspections. But hat stiffeners seem to be popular on modern composite wings.
The book "Aircraft Loading and Structural Layout" by Denis Howe (published by AIAA 2004) contains data for preliminary sizing of aircraft structures. Table 13.4 on page 385 gives values of "buckling efficiency" for different shaped stiffeners. The higher the number, the better (at least from a theoretical weight point of view).
Z stiffener (built-up) 0.96
Z stiffener (machined) 1.02
Blade stringer 0.81
Hat stringer 0.96
etc.
The old NACA reports contain many studies of stiffened skins with different stiffener shapes.
I have attached a few picture I took at an air museum where they had a C-135 (military version of Boeing 707) with the outer wing cut off so you could see the inside. As you can see, they mostly used Z shaped stiffeners.