Hume doesn't, of course, discuss the Miracle of the Sun, since the events at Fatima occurred long after his time. But he does discuss another famous modern miracle event, that of the Holy Thorn, in a footnote added to the essay on miracles in 1750.
On March 24, 1656, a ten-year-old girl named Marguerite Périer, who was living at Port-Royal-des-Champs, who was suffering from a lachrymal fistula was given the privilege of having a relic, supposedly a thorn from Christ's crown of thorns, touched to her sore. Within a day the problem, thought to have been incurable, was gone. On April 14, several surgeons and physicians signed a certificate attesting that the cure was beyond natural means and ecclesiastical inquiry began.
The event was a breath of life for the Jansenists, Port-Royal being the center of their movement. The Jesuits had been denouncing their position very harshly and had been increasingly winning an audience, the royal court had begun to press them heavily, and Antoine Arnauld, their primary representative and defender, had been censured. With the Miracle of the Holy Thorn, however, all this changed; the Jesuits continued to denounce, but the miracle became very popular and raised the Jansensists in the estimation of the people. The royal court pulled back from its pressure, at least for a while. And the uncle of Marguerite Périer, who had already been pro-Jansenist and had published an anti-Jesuit work just six months before, was motivated by the event to even more intense efforts on behalf of the Jansenists; his name was Blaise Pascal. It was taken by the Jansenists as a sign of divine favor, and was the first in a long line of Holy Thorn and other miracles to which the Jansenists would point.
It was also probably the beginning of the destruction of Jansenism; it led the Jansenists to look for miracles, and the miracles claimed by the Jansenists became more and more extreme and disruptive until eventually the full force of Church and State were brought against them. The nuns at Port-Royal themselves, from the beginning, had wisely taken a very cautious stance to all the purported miracles; but outside Port-Royal, things built up slowly to the point of people undergoing convulsions at the tomb of the Abbé Paris from 1727-1732. Once the Jansenists claimed the Miracle of the Thorn as a sign of divine favor, they had also escalated the pitch of their argument with the Jesuits to its highest possible point: the Jesuits had no alternatives save to concede or to work to bring the full force of condemnation against the Jansenists. And the Jesuits were not exactly the conceding type.
Hume, who had spent time at the Jesuit center of La Flèche while writing the Treatise, no doubt read up on the whole situation with interest, and probably took a rather ironic delight in it all: some of the more extreme Jesuits at one point had begun to argue, on grounds startling like those of Protestants rejecting miracles of the saints, that after the miracles of the Gospels there was simply no need for any miracles anymore. Neither Hume's Calvinist readers nor most Catholics of Hume's day would have accepted the Jansenist miracles, which had begun to be labeled with that ultimate insult of the eighteenth century, enthusiasm. But the Jansenist miracles have a number of features that would make them fare better than most other attestations to miracles would: many, many witnesses, fairly recent, occurring in a civilized country, etc. Thus the Miracle of the Holy Thorn, precisely because of the quality of its attestation, becomes part of Hume's argument that we can never believe a religious miracle on testimony.