Old English grennes "green color; quality of being green," in plural, "green things, plants;" see green (adj.) + -ness. Meaning "immaturity" is from early 15c. Walpole coined greenth (1753) in the same sense.
Old English grene, Northumbrian groene "green, of the color of living plants," in reference to plants, "growing, living, vigorous," also figurative, of a plant, "freshly cut," of wood, "unseasoned" earlier groeni, from Proto-Germanic *grōni- (source also of Old Saxon grani, Old Frisian grene, Old Norse grænn, Danish grøn, Dutch groen, Old High German gruoni, German grün), from PIE root *ghre- "grow" (see grass), through sense of "color of growing plants."
From c. 1200 as "covered with grass or foliage." From early 14c. of fruit or vegetables, "unripe, immature;" and of persons, "of tender age, youthful, immature, inexperienced;" hence "gullible, immature with regard to judgment" (c. 1600). From mid-13c. in reference to the skin or complexion of one sick.
Green cheese originally was that which is new or fresh (late 14c.), later with reference to coloring; for the story told to children that the moon is made of it, see cheese (n.1). Green light in figurative sense of "permission" is from 1937 (green and red as signals on railways first attested 1883, as nighttime substitutes for semaphore flags). Green thumb for "natural for gardening" is by 1938. Green beret originally "British commando" is from 1949. Greenroom (also green room) "room for actors when not on stage" is from 1701; presumably a once-well-known one was painted green. The color of environmentalism since 1971.
word-forming element denoting action, quality, or state, attached to an adjective or past participle to form an abstract noun, from Old English -nes(s), from Proto-Germanic *in-assu- (cognates: Old Saxon -nissi, Middle Dutch -nisse, Dutch -nis, Old High German -nissa, German -nis, Gothic -inassus), from *-in-, originally belonging to the noun stem, + *-assu-, abstract noun suffix, probably from the same root as Latin -tudo (see -tude).