I assume that it's derived from the use of green in modern traffic signals for "go ahead".
Merriam Webster agrees with this idea, and notes that the first usage was in 1937 as a compound, and 1935 as a couplet.