Spoiler: It’s not all about Jonah.The Italian artists of the Renaissance were not particularly familiar with the habits and the appearance of whales. In fact, identifying the biblical sea monster of the story of Jonah was often difficult: sometimes, these artists would think of it as some sort of sea dragon, a gigantic fish, or even a monstrous dolphin, so most depictions of whales in Renaissance (and medieval) art were not exactly the most adequate. We often find whales showing large fangs, elephant-like trunks, or even horns.
In any case, the fact that the biblical narrative claims Jonah was swallowed by a whale and disgorged three days later was always read allegorically, likened to Christ in the sepulcher and his Resurrection after three days. In that sense, whales represent both death and the hope of the Resurrection into eternal life.
But, as is often the case, the Bible is not the only source for inspiration Christian artists recurred to.
According to George Ferguson’s classic Signs and Symbols in Christian Art, ancient legends told stories of mariners who would confuse the large body of the whale for an island. Ships anchored to its side were dragged down to destruction as soon as the creature would plunge. That is why in some occasions, Ferguson explains, the whale came to be used also as a symbol of the devil and his cunning, and the open mouth of the whale was often used to depict the open gates of hell.