The association of green with jealousy (as opposed to envy) is attested since around the time of Shakespeare (notably in Othello, Act III, Scene 3: “O, beware, my lord, of jealousy; it is the green-eyed monster which doth mock the meat it feeds on”).
However, Shakespeare probably did not invent this use: green was already associated with sickness, and the overproduction of yellow-green bile had long been associated with jealousy and other ‘restless’ emotions.