Should I paint the drywall walls, before installing tile, sink and vanity?
Paint first You will have fewer things to mask/protect and fewer critical edges to deal with and less stuff getting in the way. If you have large areas that you know will never be exposed, you can skip them - or paint them generally (e.g., roller but not brush edges; or primer only) but not worry about getting it "perfect".
There isn't an exact answer but I can break it down for you.
You can always prime first. Since this is 60-70% of the job with new drywall - get this done. You will want to use a good primer for a wet area - Killz makes a good product but if it is my house I use oil based primer. But the point is a good primer is more apt to stain things or cause damage so you get that out of the way.
Whether or not you put on your finishing coat is dependent on what is right next to the things you need to paint. I normally always paint ceiling.
But the vanity and mirror and stuff like that. Most of the time I paint around it. The thing is there is a good chance that during your install you will scratch something. Touching up is no big deal but and a big but making your touchup look like it was the same coat can be a little trickier. Also if you bang something into wall it is like 5 minutes to hit it with quick dry spackle then primer after and that surface will mimic the other primed surfaces... You nic a wall that is painted and hit it with spackle and primer... it will look like a patch job.
So really you have a to do an analysis of how much room you have to work with, how likely you are to mess up paint job and how much extra time it will take you to paint around things. I would say 70-80% of the time I paint after but I have done some large bathrooms where I wouldn't have even thought about painting after.
I don't know how much it matters but I would personally feel better about not painting behind where the tile would go as much as possible. That could mean painting first but leaving the tiles areas as unpainted as possible or painting after tiling. If wall behind toilet is painted paint that because it's hard to access after toilet is in.
I would rather have the tile attached to the wallboard directly if possible.
Paint can peel. Especially in the presence on moisture. If your using thinset for the tiles it contains water.
If the walls are already painted... Not fresh drywall paint first but let paint cure fully before tiling over it. Pain can should say how long till cured. Not just dry but cured.
I prefer to paint before installing. If you have to move or adjust cabinets, mirrors ect.before installation. it is much easier to move. On top of that it is way more easy to roll out the whole wall than to cover and tape everything off and cut it in.