This phrase is used to describe someone who can remain calm under pressure.
The exact origin of the phrase is unknown, but it’s believed to come from the fact that, even in hot weather, the inside of a cucumber can be as much as 20 degrees cooler than outside air.