As any non-native English speaker can attest, English, both British and American, abounds with idioms. Idiomatic expressions might be obviously metaphoric, or their true meanings might be far from obvious. The idiom "as cool as a cucumber" is relatively transparent, conjuring a person who remains cool, calm, and collected in a difficult situation just as a cucumber’s inner flesh remains cool even if it’s just been plucked from a hot garden.
One of the appealing features of this idiom is the sounds. "Cool" and "cucumber" both begin with a /k/ sound followed by a vowel that, while different, is close enough to suggest a pleasing and playful internal rhyme. In addition, both words stress the initial syllable, and the only other words in the idiom have almost no meaning themselves, making this one tightly crafted saying.
"Cool as a cucumber" does more than succinctly describe a person who is self-contained. It simultaneously draws upon sensory details of sight and touch. Regardless of specifics, nearly every speaker of English not only knows what a cucumber is but has direct experience. That direct experience almost certainly supports the image of a cucumber as being cool to the touch, whether it’s found in the crisper or the garden.
In fact, whether because of their reputation for being cool or because of other characteristics, cucumbers are very rarely part of a dish that has been cooked. Many diners would point out that misguided cooks who add diced cucumber to a casserole or soup are likely to have almost as much food left over after the meal as they had going into it. Most cuisines that feature cucumbers have them as a main salad ingredient, such as Indian yogurt cucumber salad, or add them to other vegetables such as carrots and red peppers for their smooth counterpoint to a salad’s crunch.
The phrase "as cool as a cucumber" is not the only food-related idiom. Anyone who’s ever been told by a salesperson that the price of a new item is "peanuts" knows the point is that the item is incredibly cheap. In fact, if the price is really that cheap, an excited buyer might "go bananas," while one who is less thrilled might remark that the savings are just "a hill of beans."
Not all food idioms point to happy moments, however. Being told that a newlywed was chosen by his much younger wife because "he’s got one foot on a banana peel and the other in the grave" is just a fanciful way of saying he’ll soon be six feet under. Someone caught spreading gossip is likely to become "as red as a beet," a sure sign to everyone around that the embarrassment is serious. Now there's a situation where it's hard to stay as cool as a cucumber!