When staining bathroom cabinets, you must always remember that preparation is key. If you prepare the surface of the cabinet well the stain can be applied evenly and will not result in any dark or light patches appearing when the stain dries. If the bathroom cabinet to be stained is in a prefabricated pack then staining it before assemblage is recommended.
Alternatively, if the bathroom cabinet has already been constructed or fitted in position, move it out to your workshop and take out/off any easily removable doors and shelves. If at all possible, staining all of the wooden components separately will result in a better job.