The Civil Rights Act of 1964 provided protection against discrimination on the basis of sex. But it turned out that that category was too general to protect one group of people, namely, pregnant women. So in 1978, the Civil Rights Act was amended by the passage of the Pregnancy Discrimination Act to include pregnancy in the prohibition against sexual discrimination.
What does that mean for pregnant women? Basically, they are entitled to the same protections that apply with respect to age and disablement discrimination.
Pregnant women cannot be denied what they would be entitled to if not pregnant with respect to hiring, firing, pay, job assignments, promotion, layoffs, training, fringe benefits (like leave and health insurance), or any other term of condition of employment. If she experiences any medical condition related to pregnancy or childbirth, she is entitled to the same special dispensations that any other temporarily disabled employee would get, like light duty, alternative assignments, or disability leave. The PDA also makes it illegal to harass a woman about her pregnancy to the point that the work environment becomes hostile or offensive. It is also illegal to make an adverse employment decision (e.g., demotion or termination) on the basis of the pregnant condition.
Pregnant women are also protected under the Americans with Disabilities Act, which requires that the employer make reasonable accommodations for the pregnant woman, unless this puts the employer to an undue burden. Also, the Family & Medical Leave Act permits the pregnant woman to take a 12 week (unpaid) leave of absence to have her baby (provided the employer has more than 50 workers and the woman has 12 months tenure).
You cannot file an action in court for pregnancy discrimination until you have first made a claim to the Equal Employment Opportunity Commission, and it has rejected your claim (which it almost always does).
This is not an action you’re going to be able to handle yourself. You need to seek counsel from an employment lawyer. The best advice is to seek counsel at the first sign of the discrimination.