Largely because old folklore described them as resembling reptile-people, and green was the obvious shorthand for that once illustrators got hold of the idea.
There is no deeper rule at work. Goblins do not exist, so the colour is a convention that stuck rather than a fact anyone can explain. Different traditions paint them differently, and modern fantasy is happy to use whatever shade the story needs.