Ducks are, of course, the perennial fall guys of the animal kingdom, invoked as symbols of bad weather ("a fine day for ducks"), powerlessness ("lame duck"), bad hair styles ("ducktail"), tasks that require no effort ("duck soup"), funny gait ("duck walk"), obliviousness ("like water off a duck's back"), and, as a final indignity, inglorious death ("dead duck"). Even when ducks triumph, it's through chance ("lucky duck"), not skill. On the bright side, we have the promise of youthful gawkiness ("ugly duckling") blossoming into adult beauty before all those horrible things happen. But even that metaphor rings hollow for ducks, as the Ugly Duckling of the fable turned out, in a cruel twist, to be a swan.
So it's not surprising that "like a duck in thunder" does not speak well of ducks. The first use of the simile appeared in 1785, in a lyric ode by Peter Pindar (pseudonym of John Wolcot): "Gaping upon Tom's thumb, with me in wonder, The rabble rais'd its eyes -- like ducks in thunder." It's unclear whether Wolcot actually had close knowledge of ducks or merely needed something to rhyme with "wonder." In any case, Sir Walter Scott later used the phrase in his 1822 novel "Peveril of the Peak": "Closed her eyes like a dying fowl -- turned them up like a duck in a thunder-storm." From these and other uses since we can deduce how ducks are reputed to act in thunderstorms: they roll their eyes back in fear and then keel over dead. It's a wonder there are any ducks to be found today, given how common thunderstorms are. In a less dramatic sense, "like a duck in thunder" has also been used since the late 18th century to mean "having a forlorn and hopeless appearance."