The Hahn family, owners of Conestoga, and the Green family, owners of Hobby Lobby, said some of the mandated contraception prevent human embryos from being implanted in a woman's womb, which the plaintiffs equate with abortion.
That includes Plan B contraception, which some have called the "morning after" pill, and intrauterine devices or IUDs used by an estimated 2 million American women.
Monday's decision comes two years after the justices allowed the law's "individual mandate" to go into effect.
That provision requires most Americans to get health insurance or pay a financial penalty. It is seen as the key funding mechanism to ensure near-universal health coverage.
Under the Affordable Care Act, financial penalties of up to $100 per day, per employee can be levied on firms that refuse to provide comprehensive health coverage. Hobby Lobby, which has about 13,000 workers, estimates the penalty could cost it $475 million a year.
The church-state issue now in the spotlight involves rules negotiated between the Obama administration and various outside groups. Under the changes, churches and houses of worship are completely exempt from the contraception mandate.
Other nonprofit, religiously affiliated groups, such as church-run hospitals, parochial schools and charities must either offer coverage or have a third-party insurer provide separate benefits without the employer's direct involvement. Lawsuits in those cases are pending in several federal appeals courts.
The cases are Burwell (Sebelius) v. Hobby Lobby Stores, Inc. (13-354); and Conestoga Wood Specialties Corp. v. Burwell (Sebelius) (13-356).