(CNN) Sunscreen does a good job of protecting our skin, but it may not be so good for marine life.

Research studies have found that chemicals found in some popular sunscreen products are harmful to ocean ecosystems. And now, after state lawmakers passed a bill Tuesday, Hawaii is set to become the first state in the US to ban the sale of sunscreens that contain oxybenzone and octinoxate.

The chemicals that help us by filtering UV rays are causing severe damage to Hawaii's marine environment, according to a study by Haereticus Environmental Laboratory , a nonprofit scientific organization. They show up in coastal waters after beachgoers swim in the ocean and via discharges from wastewater treatment plants.

The study found that the chemicals seep into young coral and contribute to coral bleaching , which occurs when an increase in sea temperatures kills the algae that grows inside coral, turning reefs white and eliminating nutrients that sustain other marine life.

Read More