curd of milk coagulated, separated from the whey, pressed and used as food, Old English cyse (West Saxon), cese (Anglian) "cheese," from West Germanic *kasjus (source also of Old Saxon kasi, Old High German chasi, German Käse, Middle Dutch case, Dutch kaas), from Latin caseus "cheese" (source of Italian cacio, Spanish queso, Irish caise, Welsh caws).
Of unknown origin; perhaps from a PIE root *kwat- "to ferment, become sour" (source also of Prakrit chasi "buttermilk;" Old Church Slavonic kvasu "leaven; fermented drink," kyselu "sour," -kyseti "to turn sour;" Czech kysati "to turn sour, rot;" Sanskrit kvathati "boils, seethes;" Gothic hwaþjan "foam").
But de Vaan writes, "no etymology can be found which does not require some poorly-founded assumptions," and suggests a loan-word. Also compare fromage. Old Norse ostr, Danish ost, Swedish ost are related to Latin ius "broth, sauce, juice."
Earliest references would be to compressed curds of milk used as food; pressed or molded cheeses with rinds are from 14c. Transferred to other cheese-like substances by 1530s. As a photographer's word to make subjects hold a smile, it is attested from 1930, but in a reminiscence of schoolboy days, which suggests an earlier use. Probably for the forced smile involved in making the -ee- sound.
Green cheese is that newly made; the notion that the moon is made of green cheese as a type of a ridiculous assertion is from 1520s. To make cheeses (1835) was a schoolgirls' amusement of wheeling rapidly so one's petticoats blew out in a circle then dropping down so they came to rest inflated and resembling a wheel of cheese; hence, used figuratively for "a deep curtsy." Bartlett ("Dictionary of Americanisms," 1848) defines head cheese as "The ears and feet of swine cut up fine, and, after being boiled, pressed into the form of a cheese."