Deoxyribonucleic acid, or DNA, is the building block of most carbon-based lifeforms. It is the blueprint for a living organism and encodes amino acids for polypeptides which form proteins, which, when properly sequenced, form cellular pathways that together form the physical structure and anatomical characteristics of an organic lifeform. If DNA is changed in some way, the host organism responds to the change by re-making itself in the form specified by the new DNA, often extremely rapidly.
In 2256, Klingons harvested Lieutenant Ash Tyler's DNA in order to reconstruct his consciousness and rebuild his memory in preparation for grafting with Voq's psyche in the choH'a'. (DIS: "Vaulting Ambition")
In the mid-2250s, Captain Maddox injected Barlow with the DNA of the Comtaxan parasite, which was known to not "mix well" with Human DNA. The injection resulted in the brutal vaporization of Barlow. (DIS: "Vaulting Ambition")
In 2367, Ishara Yar offered to have her DNA tested as a means of proving that she was Lieutenant Natasha Yar's sister. The test was administered by Doctor Beverly Crusher and proved that her claim was true. (TNG: "Legacy")
In 2369, when Lieutenant Reginald Barclay was exposed to a high-energy plasma field in a transporter field, Dr. Crusher wanted to examine him using a base pair correlation to see if there was any sign of breakdown in his DNA. (TNG: "Realm of Fear")
Also in 2369, Dr. Crusher investigated the cause of the age reversion of four crew members. She explained that unlike DNA, which never changed, RVN (rybo-viroxic-nucleic) took on additional varoxic sequences during puberty. (TNG: "Rascals")
That same year, following clues developed by his mentor, Richard Galen, Jean-Luc Picard discovered evidence that an ancient race of humanoids had seeded many planets with their DNA billions of years earlier. The evidence suggested that Humans, Romulans, Klingons, Cardassians, and others may have far more in common than previously believed. (TNG: "The Chase")
Changelings had DNA in their morphogenic matrix. In 2369, Constable Odo noted that traces of his DNA had been left at the scene of Ibudan's murder on Deep Space 9, intended to aid in framing him for the crime. (DS9: "A Man Alone")
DNA extracted from a male could be used to impregnate a female. In 2372, Seska claimed she impregnated herself with DNA she had stolen from Commander Chakotay while he was her prisoner. (VOY: "Maneuvers")
Each cell of the DNA of a member of Species 8472 contained more than one hundred times the DNA of a Human cell, making them the most densely coded lifeform that The Doctor had ever seen. (VOY: "Scorpion")
In 2375, Commander Valerie Archer (secretly a member of Species 8472 in disguise) shared a kiss with Commander Chakotay to obtain his DNA, which she was then able to analyze to prove that he was Human. (VOY: "In the Flesh")
Background information Edit
As DNA research was relatively new in the 1960s (DNA structure was first established in 1953 with the first notable DNA sequencing research conducted in 1973), Star Trek: The Original Series has no mention of this rather significant piece of medical science, even though DNA would have been well known in the 2260s according to Star Trek canon. It is also for this reason that Original Series episodes depended on other medical methods, whereas DNA samples would have been the preferred choice. Such examples include the voice print identification of Kodos, seen in TOS: "The Conscience of the King", and a reference to "medical plates" during the examination of Peter Kirk in TOS: "Operation -- Annihilate!".