Cain was originally the host of DC Comics' HOUSE OF MYSTERY horror anthology series, as of #175 (1968). Abel first appeared in DC SPECIAL #4(1969) and became the host of HOUSE OF SECRETS (1969-1978) in issue #81 when it was revived after a three year hiatus. Cain and Abel also sometimes co-hosted along with Eve in the horror/humor book PLOP! (Interestingly, Batman entered the House of Mystery in BRAVE AND THE BOLD #93, narrated by Cain.) THE HOUSE OF MYSTERY was cancelled around 1983.
The brothers were revived from comic book limbo when they appeared in Abby's dream in SAGA OF THE SWAMP THING #33 (1985). Abel retold the first published story of "Swamp Thing" (from HOUSE OF SECRETS #92. That was actually the story of former Swamp Thing Alex Olsen, written by Len Wein and drawn by Berni Wrightson in 1972. The success of that story inspired Wein and Wrightson to create the first SWAMP THING series in 1972. Some say Wein was the visual inspiration for Cain.
Cain was replaced by TV host Elvira in the 1986 revival of the HOUSE OF MYSTERY series, while he was a supporting character in BLUE DEVIL. Issue #5 of Elvira's book references ST #48, and Cain refers to her in #50.
SANDMAN #2 establishes Cain and Abel to be inhabitants of The Dreaming, where Morpheus, the Dream King, rules and creates/maintains all dreams and stories. Other former horror anthology comic book "host" characters that were revived in SANDMAN include Eve (from SECRETS OF THE SINISTER HOUSE), Lucien (from the short-lived TALES OF GHOST CASTLE, 1975), and the Mad Mod Witch (now called the Fashion Thing) from the 1950's (TALES OF THE) UNEXPECTED. Indeed, Cain and Abel's fellow host Destiny (from WEIRD MYSTERY TALES and SECRETS OF THE HAUNTED HOUSE) is a major character among the Sandman's family of the Endless. (Charity, host of FORBIDDEN TALES OF THE DARK MANSION, is a recurring character in James Robinson's 1990's STARMAN series. She's the only DC horror host not to appear in Gaiman's SANDMAN.)
While Eve denies being Cain and Abel's literal mother, Cain remarks that she is truly "everyone's mother." Cain, Abel and Eve exist on all planes of reality in different forms, so in a sense they are and aren't the people in the biblical book of Genesis. Cain and Abel continually act out "the first story", with Cain repeatedly killing his brother.
Notable appearances in SWAMP THING:
In Abby's dream.
In the framing sequence, Cain tries to explain to Abel the significance of the change in the relationship between Good and Evil.
In an afterlife limbo realm, Matt Cable is provoked by Eve to accept responsibility for his life. Cain and Abel are vaguely referred to.