1897, from German Lumpenproletariat, coined by Marx, who used it in the sense of "the rabble, poorest of the working class," "who make no contribution to the workers' cause" [OED]. From German lump "ragamuffin," which is related to lumpen "a rag, tatter," probably ultimately related to English lump (n.). With proletariat.
Marx used it first, apparently, in 1850 in German newspaper articles collected and republished in 1895 as "Die Klassenkämpfe in Frankreich 1848-1850." Its secondary sense of "boorish, stupid people" led to lumpen- being taken as a word-forming element meaning "unenlightened."
c. 1400, "dark," figuratively "morally unenlightened; gloomy," from Old French obscur, oscur "dark, clouded, gloomy; dim, not clear" (12c.) and directly from Latin obscurus "dark, dusky, shady," figuratively "unknown; unintelligible; hard to discern; from insignificant ancestors," from ob "over" (see ob-) + -scurus "covered," from PIE root *(s)keu- "to cover, conceal." Related: Obscurely.
The figurative sense of "not readily understood, not manifest to the mind or understanding" is from early 15c.; of persons, "not illustrious or noted, unknown to fame," 1540s. The more literal sense of "indistinct, without clearness of form or outline, hardly perceptible, not capable of being clearly seen through lack of light" is attested in English from 1590s.
In regard to the meaning of something said or written, obscure is general, being founded upon the figure of light which is insufficient to enable one to see with any clearness; this figure is still felt in all the uses of the word. [Century Dictionary, 1895]