Ultimately there is no absolute rule. A person has to try various looks and see what they wear best. And also what feels right and gives them confidence because that's a part of looking good.
Generally speaking I prefer long hair. However there are chicks who pull of the short haired look really well. I think it helps to have a smallish head and face to wear such a look.
Obviously, the hotter the woman, the less important the hair becomes. But long hair is more forgiving, it can be a feature in itself. You can also do more looks with it (pony tail, bun, bundle, hide-in-cap...) which is another plus.
I don't think short hair is always an expression of confidence. Sometimes it looks like a heavy handed attempt to embrace androgeny or reject vanity with a kind of overkill that smacks of desparation.
On the other hand, someone who is burdened or frustrated by long hair she is clearly uncomfortable with will project that discomfort in her look.