Cucumber time appears in the Oxford English Dictionary, with the first example being this:
Cucumbers, Taylers. Cucumber-time, Taylers Holiday, when they have leave to Play, and Cucumbers are in season.
A New Dictionary of the Terms Ancient and Modern of the Canting Crew, 1700. Tayler is a variant spelling of tailor.
The entry doesn’t explain what cucumber time actually is. From the examples, it becomes clear that it’s a season of the year, obviously summer. A correspondent to the scholarly publication Notes and Queries in 1853 explained: “This term ... the working-tailors of England use to denote that which their masters call ‘the flat season’”. The Pall Mall Gazette enlarged on that in 1867: “Tailors could not be expected to earn much money ‘in cucumber season.’ Because when cucumbers are in, the gentry are out of town.” So it is the dull time of year, when orders are few, work is slack and tailors perforce have time to themselves (the use of play in the 1700 dictionary is clearly sarcastic).
After 1861, the British media started to refer to this period of high summer as the silly season, originally the time of year when Parliament and the law courts were in recess, anybody of substance had left London and news was in short supply. (The term was the invention of an unsung writer on the old Saturday Review.)
Tailors became known slangily as cucumbers because of this reference to their cucumber time. The OED’s entry for this sense of cucumber consists of a mystified note by the editor that cucumber, is “used with some obscure reference to a tailor”. The writer to Notes and Queries attempted to explain this, too:
Cucumber Time. — This term ... has been imported from a country which periodically sends many hundreds of its tailors to seek employment in our metropolis. The German phrase is “Die saure Gurken Zeit,” or pickled gherkin time.
Notes and Queries, 5 Nov. 1853.
Sauregurkenzeit (as it is usually written) is indeed a German idiom with that literal meaning, which expresses the same idea as the English silly season. However, the writer’s assertion requires German tailors to have been coming to Britain before 1700, which may have been so, though I suspect the writer would have been hard pressed to provide evidence.
What is odder still is that several languages contain literal translations of the phrase cucumber time or cucumber season or its near-equivalent using gherkin: Estonian (hapukurgihooaeg), Dutch (komkommertijd), Norwegian (agurktid), Hungarian (uborkaszezon), Czech (Okurková sezóna), Polish (Sezon ogórkowy), and Hebrew (Onat Ha’melafefonim). Both the Dutch and Norwegian terms are said to be from English. But, as a guess, unsupported by evidence but with the Hebrew usage as a pointer and remembering the strong traditional association of Jews with tailoring, might it be that the expression was originally Yiddish?
As a further excursion into slang, there’s this quip, which was quoted by the same correspondent to Notes and Queries:
Tailors are vegetarians, who “live on cucumber” while at play, and on “cabbage” while at work.
You might think cabbage here is the slang term for money, but that’s twentieth century and American. The cabbage in this case is, however, an equivalent idea, since it was the name given to the waste cloth left over when tailors cut out clothes, and which was appropriated by them as a perquisite. Peter Scoging tells me that cabbage in this sense is still used in the garment trade in Britain.