In certain limited circumstances, adultery may be relevant, but these are very limited circumstances. If there are children of the relationship that are being affected by the affair, then yes, it could be heard by a judge. It could be relevant to the custody proceedings if the affair is causing a depletion of marital assets. If money is being spent on something outside of the marriage and outside of the family needs, possibly there is a valid argument for what is called dissipation of marital assets.
But again, adultery is only relevant in very limited circumstances. According to Legal Beagle, you can point to the stress and emotional distress that is caused by an affair. For instance, in a collaborative divorce where you are primarily meeting for settlement conferences, there might be a need to bring in a divorce coach or somebody else that can address those issues that the affair has caused that can help you. They can help you negotiate an overall settlement of parenting issues or financial matters.
Collaborative divorce or mediation, where it is more private, is an appropriate place for marriages that are ending due to adultery. Other times, litigation is necessary if you need reimbursement of assets or if you are seeking a return of monies that have been spent that should have been spent for your children or maintaining your family.
Sometimes litigation is the way to go. You may need to analyze your situation a little bit more and find out which method of divorce is appropriate for your circumstances. And if adultery has been present in your marriage, you should present it as evidence.