A photographer's instruction just before taking a picture, in order to make people smile.
'Say cheese!' must have been said to people posing for photographs as often as 'watch the birdie!'. Articulating a long 'e' sound requires us to draw back our lips and bare our teeth in a grimace, which is the obvious reason for photographers using it. The question is though - why cheese and not some other word? (and, come to that, why birdie? - but more on that later).
Despite exhaustive etymological delving, no one has found any literal link between 'say cheese' and the meaning of the word cheese. Some have suggested that it relates to the now rather archaic term 'cheese it', meaning 'run away'. That's pure speculation and in any case; why would a photographer just about to take someone's picture encourage them to run away? However, looking up this phrase did uncover a nice punning definition of 'cheese it' in the Indiana Weekly Messenger, October 1910:
"What do boys mean when they say 'cheese it?'"
"It means that something mischievous has a curd and they want to get a whey."
Nor is 'say cheese' anything to do with the American expression 'cutting the cheese' about which, if you haven't come across it before, I'll happily leave you in ignorance.
'Cheese' was probably chosen because both the 'ch' and 'ee' sounds require a baring of the teeth, but then, so other words, like 'each' and 'seas'. Of course, non-English speaking cultures also take photographs and have their own versions. In Mexico and Argentina, they say 'whisky' and in France, 'dit souris' ('say mouse').
The term was probably coined impromptu by a photographer and we aren't ever likely to find out who that was. I can give a pointer to who first popularised the use the word when having a photograph taken. The earliest printed records of the expression are from the 1940s, in particular, this piece from the Texas newspaper The Big Spring Daily Herald, October 1943, titled Need To Put On A Smile? Here's How: Say 'Cheese':
Now here's something worth knowing. It's a formula for smiling when you have your picture taken. It comes from former Ambassador Joseph E. Davies and is guaranteed to make you look pleasant no matter what you're thinking. Mr. Davies disclosed the formula while having his own picture taken on the set of his "Mission to Moscow." It's simple. Just say "Cheese," It's an automatic smile. "I learned that from a politician," Mr. Davies chuckled. "An astute politician, a very great politician. But, of course, I cannot tell you who he was..."
Ambassador Davies looked every inch the politician who took his own advice. His coy 'I cannot tell you who it was' was no doubt delivered with a wink, as Davies served under President Franklin D. Roosevelt, who fits his description perfectly well, as listeners in 1940s America would have been well aware.
The fact that the newspaper report presented Davies' recipe as a novelty that its readers would previously be unfamiliar with does suggest that the phrase can't be much earlier than 1943 in origin. It's also reasonable to speculate that it was Roosevelt introduced the phrase into the language.
Photographers these days often prefer to use 'Say, one, two, three', as it produces the same grins and makes sure that all the sitters smile at the same time. While it appears that virtually any 'long e' word could have been chosen instead, 'cheese' has stood the test of time and has resulted in a new adjective - 'cheesy'. People began to speak of 'cheesy grins' or 'cheesy smiles', as demonstrated by Ambassador Davies, in the 1960s. The word 'cheesy', meaning 'vulgar'/'tasteless', derives from the perceived insincerity of cheesy grins.
As for 'watch the birdie', this now outdated instruction, usually given to children to get them to face in the right direction for a photographic portrait, unlike 'say cheese', did refer to an actual object. The 'birdies' were animated props that could be made to squawk or warble and so attract a child's attention.