Sitting on a toilet cures your sickness if you are sick, and makes you less satiated by 200-599 nutrition points if you are satiated. Otherwise, you don't have to go, and there is no effect.
Use of the #pray command at a toilet is deemed to be an attempt to ``pray to the Porcelain God''. This does not affect your prayer timeout, or require you to satisfy any of the conditions for praying successfully. It currently violates atheist conduct, but this is likely to change in the near future. If you are sick, stunned, or confused, ``He smiles upon you'' and you are cured. Otherwise, ``He ignores your pleas''.
Dogs like to drink from toilets, so if you try drinking from a toilet while polymorphed into a dog, there is a 4/5 chance of finding the toilet water quite refreshing and gaining 10 points of nutrition. Otherwise, these are the possible effects:
Dipping anything into a toilet gets it wet, with all the usual effects such as rusting metal objects, diluting potions and blanking scrolls. In addition, dipping a weapon poisons it, and dipping food makes it rotten.
Applying a digging tool to a toilet breaks it, and kicking a toilet has a 1/4 chance of breaking it.