It varies from model to model, but the basis of my system is to paint sub-assemblies after they are built. As an aircraft builder I might build up an entire engine or cockpit before painting for example. I always do the external painting, the camouflage scheme or whatever, before I attach all the 'knock offy' bits like antenna, undercarriage etc.
I never paint parts on the sprue as I find cleaning the paint off attachment points always needs a touch up and is a waste of time, others will disagree! You just have to find what works best for you.
Cheers
Steve