How do I prevent masking tape on paintwork from pulling off paint?
Are you using plain brown masking tape, or the slightly more expensive painter's tape?  I've had the best luck when I've spent just a little bit more to get better quality tape.  It comes off easier, and leaves behind less residue.

No matter what kind of tape you use, I also agree with Niall C.  Definitely remove the tape as soon as you can after painting.  You don't have to wait until the paint is dry.