Most corals are photosynthetic and much of their primary coloration is a result of the pigments used by all photosynthetic cells. Some pigments are used directly in the photosynthetic process to capture light energy from the sun and transform it into organic compounds in the light reactions of photosynthesis. Other pigments are used indirectly as accessory pigments. Some have oxidative abilities and are used in the electron transport chain that is part of both the light and dark reactions of photosynthesis. Some even have duplicate functions adding other levels of function to the photosynthetic cell.
Marine algae contain a preponderance of all pigments known to exist.
These algal symbionts have been covered in much depth by many authors and researchers. Chlorophyll-a is a pigment largely responsible for green coloration. It is found in almost plant cells, including the zooxanthellae. It's primary absorption peaks are at 430 nm and 670 nm. corresponding to the blue and red areas of the spectrum. The fact that it absorbs these colors, means it reflects the colors it does not absorb, hence the perceived color of green.