If you feel you must discuss how your son and his wife are bringing up their children with them, be very careful how you go about it.
I would advise you to start by asking your son whether the child is making this up, as it sounds highly unlikely in this day and age that parents are locking their children in.
I assume you did not use this method of punishment, yourself, but perhaps your daughter-in-law was locked in as a child, and regards it as normal.
A bathroom sounds a rather dangerous place to lock a small child into to me.
Another way of tackling this could be to find out whether it actually is illegal to lock children into rooms in the house. If it is, then you should point this out, once you and your son have established whether the four year old is "telling stories" or the truth.
A four year old might well be making this up, or saying "locked in" when she means "sent to my room until Mummy says I can come out", which is surely no worse than standing a naughty child in the corner.
At her age, I told mumy that Lyla, our beloved mother's help had shut me into the hen-run. So she had, but she did not know I had followed her into it!