f. L. sardoni-us + -AN. The Latin adj. is ad. Gr. Σαρδόνιος Sardinian, which in late Gr. was substituted for σαρδάνιος (Homer, etc.; of obscure origin), as the descriptive epithet of bitter or scornful laughter; the motive of the substitution was the notion that the word had primary reference to the effects of eating a 'Sardinian plant' (L. herba Sardonia or Sardōa), which was said to produce facial convulsions resembling horrible laughter, usually followed by death.

The common expl. given of this laugh was that it resembled the effect produced by a Sardinian plant (Ranunculus Sardoüs, Sardinian crowfoot, called σαρδάνη by Tz. ad Hes. Op.59, σαρδόνιον by Ps.-Dsc.2.175, D.Chr.32.99) which when eaten screwed up the face of the eater, Paus.10.17.13, Sch.Pl. l.c., Phot., Serv.ad Verg.Ecl.7.41; whence later authors wrote σαρδόνιον or σαρδώνιον (from Σαρδώ) for σαρδάνιον, Ps.-Dsc. l.c., D.Chr. l.c., Luc.Asin.24, etc., σαρδώνιος γέλως and -ωνία πόα Dsc.Alex.14, and σαρδόνιον appears as a v.l. in Hom. and Pl.; hence our form sardonic; this and other explanations are given in Timae.29, Zen.5.85, Tz.ad Lyc.796, Sch. Pl. l.c.)

The following translation of Suda, s.v. Σαρδάνιος γέλως (Σ 124 Adler, tr. Robert Dyer et al.) comes from that wonderful resource, the Suda On Line. I've taken the liberty of substituting citations for footnote numbers in square brackets:

A proverb [applied] to those laughing at their own death. Demon [says] that it was handed down because the inhabitants of Sardinia used to sacrifice to Cronus the finest of their captives and those over 70 years of age, who laughed to show their courage (that is, bravery). [FGrH 327 F18] But Timaeus [says] that those who had lived long enough in Sardinia used to laugh when they were herded by their sons with wooden staves into the trench in which they were about to be buried. [FGrH 566 F64] Others [say] that it came from grinning with mischievous intent. [schol. Homer, Odyssey 20.302] And Clitarchus [FGrH 137 F9] and others say that in Carthage, during great prayers, they place a boy in the hands of Cronus (a bronze statue is set up, with outstretched hands, and under it a baking oven) and then put fire under; the boy shrunk by the fire seems to laugh. Simonides [fr.202A Bergk] [says] that when the Sardinians did not wish to hand over to Minos Talos, the crafted man, the latter leapt into a fire, being made of bronze, and, clasping them to his breast, killed them with their mouths open. Silenus, in the fourth book of his History of Syracuse [FGrH 175 F5], [says] that there is among the Sardinians an herb resembling celery and those who taste it bite off pieces of their own faces [i.e. lips] and flesh. Some [say] that it is of those laughing at evil, as Homer says of Odysseus, 'But godlike Odysseus smiled a sardonic smile,'[cf. Homer, Odyssey 20.301-2] and elsewhere, 'She laughed sweetly with her lips, but her face was not cheerful under her dark brows.'[cf. Homer, Iliad 15.101-3]

Suda On Line's notes are also helpful:

These many fanciful explanations, many basing the definition on retracted lips rather than the sound of laughter, arise from attempts to explain Odysseus's sardonic smile when he avoids being killed by an ox's jaw thrown by one of the suitors (Homer, Odyssey 20.302). The scholiast on that passage and on Plato Republic 337a think the adjective is related to participle σεσηρώς which refers to grinning or sneering. The connection with Sardinia perhaps arises from early antiquarians wishing to show their knowledge of customs of the Sardinians or of the Phoenician colonists there. The adjective for Sardinian is usually not 'Sardanios' but 'Sardonios.' Sardinia was, however, an active source of Phoenician trade in metallurgy well before Homer's day (OCD3, s.v. Sardinia), and a connection is possible. The phrase occurs of laughter in Plato (Republic 337a, with a lengthy note by the scholiast, again differing slightly from Suda, the Homeric scholia and the scholia to Lycophron 796), Cicero (ad Fam. 7.25.1) and elsewhere.