In reference to dark eyes, often as a mark of beauty, from 1660s. Black-eyed is from 1590s in reference to women, from 1728 in reference to peas. The black-eyed Susan as a flower name (various species) is by 1881, for their 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?"