First, you have to get into their rooms.
The timing for that is different for some of them, but generally you have to try entering their palace at night. At that point:
- you may find the guard outside the palace asleep. You can proceed freely
- you can put the guard to sleep with the Sleeping Powder
- you can put the guard to sleep with Moth Princess
- you can sneak past the guard with Slime Princess
Once you're in there's usually, but not always, a stealth section to reach her room.
In her room you can have a "good time" with her IF:
- she likes you enough (at least 3 "hearts" in her page of the status screen)
- you put her to sleep (bad knight!)