Jedi Dade is right. It's often a "judgement call" depending on the kit, how the parts are assembled, how you want the finished kit to look, and so on. Sometimes it's better or easier to paint before assembly, sometimes it's better or easier after. There often is no right or wrong way.
That said, if you paint prior to assembly it is recommended to remove the paint from the two surfaces that are to be bonded so that you're cementing/gluing bare styrene to bare styrene, bare resin to bare resin, bare vinyl to bare vinyl, and so on (this is especially true of chrome plated styrene parts), and touch up your paint work after the cement/glue has cured completely.