Tough question! I don't believe in offering advice or judgement where none has been requested. And I don't believe in avoiding the truth when the subject comes up directly. How other people keep their homes is really their business, but of course it's your business to safeguard your children's health.
Telling the truth is not comfortable in a situation like this, but for me, bathroom and kitchen are the most critical shared spaces. So, if it seems at some point to become necessary, I would just flat-out say, "I love it that our children are friends. And I've noticed that your bathroom is dirty and that I'm very uncomfortable picturing my son using it."
Whatever you say, do your best to limit it to a clear, objective observation (a dirty room) and the feelings that arise in you (discomfort). Feelings are just there and nobody can tell you they're wrong. Observable facts just exist. She can't really argue with you, or logically blame you, for either of these.
But people arent' always logical. You could expect any kind of reaction to this, from tears to embarrassment to anger. But if the space allows, you might ask her if there is anything you might do to assist her. Would you be willing to spend an hour or two of your time helping her clean up a bit?
This information, and an offer of caring assistance, could make a huge positive impression. If she chooses to obstruct the friendship between your sons, that would be sad. So weigh in the possible effect on the kids as you decide whether to say anything.