1961, "comedy that deals in themes and subjects usually regarded as serious or taboo," from black (adj.), in a figurative sense of "morbid," + comedy. Compare French pièce noire, also comédie noire "macabre or farcical rendering of a violent or tragic theme" (1958, perhaps the inspiration for the English term) and 19th-century gallows-humor. In a racial sense, from 1921.
In reference to dark eyes, often as a mark of beauty, from 1660s. Black-eyed is from 1590s of women, of peas from 1728. The black-eyed Susan as a flower (various species) so called from 1881, for its appearance. It also was the title of a poem by John Gay (1685-1732), which led to a popular mid-19c. British stage play of the same name.
All in the Downs the fleet was moored,
The streamers waving in the wind,
When black-eyed Susan came aboard,
"Oh! where shall I my true love find?
Tell me, ye jovial sailors, tell me true,
If my sweet William sails among the crew?"