The marine cyanobacterium Synechococcus is the second most abundant phytoplanktonic organism in the world's oceans. The ubiquity of this genus is in large part due to its use of a diverse set of photosynthetic light-harvesting pigments called phycobiliproteins, which allow it to efficiently exploit a wide range of light colors. Here we uncover a pivotal molecular mechanism underpinning a widespread response among marine Synechococcus cells known as "type IV chromatic acclimation" (CA4). During this process, the pigmentation of the two main phycobiliproteins of this organism, phycoerythrins I and II, is reversibly modified to match changes in the ambient light color so as to maximize photon capture for photosynthesis. CA4 involves the replacement of three molecules of the green light-absorbing chromophore phycoerythrobilin with an equivalent number of the blue light-absorbing chromophore phycourobilin when cells are shifted from green to blue light, and the reverse after a shift from blue to green light. We have identified and characterized MpeZ, an enzyme critical for CA4 in marine Synechococcus. MpeZ attaches phycoerythrobilin to cysteine-83 of the α-subunit of phycoerythrin II and isomerizes it to phycourobilin. mpeZ RNA is six times more abundant in blue light, suggesting that its proper regulation is critical for CA4. Furthermore, mpeZ mutants fail to normally acclimate in blue light. These findings provide insights into the molecular mechanisms controlling an ecologically important photosynthetic process and identify a unique class of phycoerythrin lyase/isomerases, which will further expand the already widespread use of phycoerythrin in biotechnology and cell biology applications.light regulation | marine cyanobacteria | phycobilisomes | fluorescence | liquid chromatography-mass spectrometry