I'd say the most comfortable/efficient crank length for a particular rider corresponds to their leg length and preferred cadence.
Persons with longer legs will usually feel better running longer cranks. But it's harder to spin a longer crank as fast as one could spin a shorter one, so persons who like spinning higher RPM's will often feel better with a shorter crank. So it's a balance of the two. This is why you really have to try different sizes for yourself and see which you prefer.
I'd also say the popular 170mm length is likely ultimate, or close to ultimate, for a high percentage of riders.