That's a good question. Whether to paint all parts, assemble all parts, or assemble and paint some but not others can depend on the kit or figure, and the result you're shooting for.
If it's an Andrea resin kit, for example, or some other resin or plastic kit, with many smaller detailed parts, or a piece of armor or an aircraft, generally, I would prime everything, and paint those areas that would be inaccessible, once assembly has begun.
Same goes for a well-detailed metal figure, especially if I were painting it in conoisseur style.
For my toy soldier figures, such as Staddens/Tradition, or Rose, or Imrie-Risley, Puchala, Dolp, etc, I tend to assemble them as completely as possible, then prime them, then paint them. Only if there is some area that cannot be reached, or cannot be easily painted after assembly, would I paint subassemblies, in that case.
These are just guidelines, of course, and not hard-and-fast rules. But after a while, you get a sense for how to approach a figure or kit.
Hope that helps!
Prost!
Brad