What legal precedent if any, exists for men who have been discriminated against, on the basis of being men?
In the US, there have been a few cases (EEOC v. The Children's Home, Inc., Michael W. Naylor v. City of Burbank) in the realm of employment discrimination. There may well be more cases which are settled without going to court. There are somewhat more court cases in the UK, see here for a number of relevant categories. In addition, there are significant cases regarding discrimination against gay males, for example Bostock v. Clayton Co, decided by SCOTUS this summer.
I nominate Craig v. Boren (1976):
Oklahoma passed a statute prohibiting the sale of "nonintoxicating" 3.2% beer to males under the age of 21 but allowed females over the age of 18 to purchase it. The statute was challenged as a Fourteenth Amendment's Equal Protection Clause violation by Curtis Craig, a male who was over 18 but under 21...The [Supreme] Court held that the gender classifications made by the Oklahoma statute were unconstitutional...
Interestingly, this decision was a landmark for women's rights, and Ruth Bader Ginsberg's involvement helped to raise her legal profile. Four years later she was confirmed to the Court of Appeals for the DC Circuit.
In the UK, there was an interesting case many years ago before discrimination based on sexual preference (being gay / lesbian) became illegal:
A company owner had a very jealous wife that stopped him from hiring a female secretary, so he hired a male secretary. Then his wife found out the male secretary was gay, and forced the company owner to fire the secretary.
This went to court. A first court decided that firing the secretary (for being gay) was at that time legal. This went then to a second court. The judge declared that the secretary wasn't fired for being gay - because a lesbian female secretary would have been acceptable to the jealous wife. He was fired for being a man, and won a case for unfair dismissal.