I am installing wood flooring in my bathroom and want to remove the molding without damage.
(after slicing the paint/caulk seam...) A wooden shingle slid behind a small prybar (http://www.hardwareworld.com/SharkGrip-Prybar-~-8-pGJXJX8.aspx) is ideal.
It also helps to find the studs and use the prybar over them because 1) that's where the nails in the molding are most likely to be, and hence lessen the chance of damaging the trim 2) the sheetrock will be less likely to break in those places as well.
There's also often a sort of order that it is installed, and is most easily removed in the reverse order. So take a look at which way the pieces overlap at mitered seams.
Cut the paint line / caulk line on the top and sides with a utility knife.
To pry, put a metal blade drywall knife against the drywall. On that, use a small pry bar to get behind the top of the trim. (You might have to gently tap the pry bar into the gap with a hammer.)
Assuming you're re-using the trim, pull the nails through the back of the trim with a pair of pliers.