For ships it's a matter of looking at the assembly. You want to put parts together that share a color, but also paint the decks and bulkheads separately because you get a cleaner line than trying to do so after you've assembled.
In many cases, of course, the deck furniture is already attached, so unless you've all the time you need to remove the details, paint the deck, and then glue them back on (I know someone who does that!) the best is to paint the deck knowing some deck paint will get onto the details, then come back with a short, fine brush to paint the details.
Photoetch, if you use it, should be painted first in a couple light coats, not one heavy, preferably with an airbrush because using a bristle brush tends to fill gaps in with paint due to surface tension, like a bubble. You'll need to touch up after you've folded and glued it on, but you'll never paint your railings properly after they're in place.