This is what I have found on the topic so far.
There are a few competing theories for why the solder mask of PCB is commonly green.
Possible explanations:
- The US military required PCBs to be green
- When mixing the base resin and the hardener together, they turn green
- It is an ergonomic choice due to the human eyes ability to detect green, and the contrast of green with white text
- Some combination of the above
Source: Thefreelibrary
Source: Quora
Digging deeper...
Liquid Photo Imageable Solder Mask (LPISM) technology was developed in the late 1970s and early 1980s to to meet the new application demands placed upon solder masks by the rise in surface mount technology. It seems that modern, green colored PCBs emerged with this technology, and the technology seems to trace back to this patent from 1980.
Consequently, endeavours have been made to produce improved processes
for producing a mask image of relatively high resolution for the
small-conductor art. It was therefore a relatively obvious step to
use photo processes in association with UV (ultra-violet) sensitive
photopolymers.
So basically, UV sensitive photopolymers were available and were the first to be used for LPISM. The polymer solution they used in the patent included 3g of dye, but did not describe the color of the dye or why they used it.
When developing an invention for the first time, it seems highly unlikely they would choose the dye or photopolymers because of the military's request or for ergonimic considerations, so we can rule those out. The most plausible explanation is that it was the most accessible, inexpensive and effective materials to be used in fabrication. For whatever reason, the UV sensitive photopolymers that were effective for this invention happened to be green at the time, and this material's proliferation is most likely due to its low cost. Alternatives do exist these days, and PCBs can be virtually any color.
I know this is all speculation, and I wish I could give a more definitive answer. I've read through patents and papers and Electronic Materials and Processes Handbook, but still haven't nailed it down yet. Maybe a PCB process engineer or researcher can help us here.