They can change policies and can require personal grooming policies provided those policies are not illegally discriminate (religion being an issue at times). So unless you have basis under a protected characteristic, they can change policies and require compliance, as a general matter.
This answer is for informational purposes only and is not legal advice regarding your question and does not establish an attorney-client relationship.
Mr. Murillo gives you good advice. You're right that this policy change sounds neither "just" nor "fair." Unfortunately, however, employers are not required to be just or fair. Rather, the limitations on an employer's conduct is usually stated in the negative: An employer may NOT violate a written employment agreement; an employer may NOT discriminate based on such factors as sex, pregnancy, age, disability, national origin, color, creed, race, or religion. An employer may NOT retaliate.
Good luck to you.
Michael S. Haber is a New York attorney. As such, his responses to posted inquiries, such as the one above, are limited to his understanding of law in the jurisdiction in which he practices and not to any other jurisdiction. In addition, no response to any posted inquiry should be deemed to constitute legal advice, nor to constitute the existence of an attorney/client or other contractual or fiduciary relationship, inasmuch as rendering legal advice involves the ability of the attorney to ask appropriate questions of the person seeking such advice and to thus gather appropriate information. In addition, an attorney/client relationship is formed only by specific agreement. The purpose of this answer is to provide the questioner with general information, not to outline specific legal rights and remedies.
Work through the list Attorney Haber provides and see if discrimination on any basis listed exists. If not, shave and keep your job. If so, document everything and see a lawyer. Your choice whether to shave first.
DISCLAIMER: The forgoing comment is for general educational purposes only, and is not legal advice upon which the reader may rely as the commenter has no actual knowledge of the facts of the case, has not interviewed persons or examined evidence, and has not researched the applicable law. The comment is based only on the facts provided, which are extremely limited, and may or may not be true. Complete defenses may prevent the success of any claim. Competent legal advice should always be obtained before taking any legal action or filing suit. Readers employ any information provided herein at their own risk.