1520s, "folly, foolish behavior," from nice (q.v.) + -ness. Meaning "exactness" is from 1670s; that of "pleasantness" is from 1809.
Entries linking to niceness
nice adj.
late 13c., "foolish, ignorant, frivolous, senseless," from Old French nice (12c.) "careless, clumsy; weak; poor, needy; simple, stupid, silly, foolish," from Latin nescius "ignorant, unaware," literally "not-knowing," from ne- "not" (from PIE root *ne- "not") + stem of scire "to know" (see science). "The sense development has been extraordinary, even for an adj." [Weekley] — from "timid, faint-hearted" (pre-1300); to "fussy, fastidious" (late 14c.); to "dainty, delicate" (c. 1400); to "precise, careful" (1500s, preserved in such terms as a nice distinction and nice and early); to "agreeable, delightful" (1769); to "kind, thoughtful" (1830).
In many examples from the 16th and 17th centuries it is difficult to say in what particular sense the writer intended it to be taken. [OED]
By 1926, it was said to be "too great a favorite with the ladies, who have charmed out of it all its individuality and converted it into a mere diffuser of vague and mild agreeableness." [Fowler]
"I am sure," cried Catherine, "I did not mean to say anything wrong; but it is a nice book, and why should I not call it so?" "Very true," said Henry, "and this is a very nice day, and we are taking a very nice walk; and you are two very nice young ladies. Oh! It is a very nice word indeed! It does for everything." [Jane Austen, "Northanger Abbey," 1803]
For sense evolution, compare fond, innocent, lewd, also silly, simple.
-ness
word-forming element denoting action, quality, or state, attached to an adjective or past participle to form an abstract noun, from Old English -nes(s), from Proto-Germanic *in-assu- (cognates: Old Saxon -nissi, Middle Dutch -nisse, Dutch -nis, Old High German -nissa, German -nis, Gothic -inassus), from *-in-, originally belonging to the noun stem, + *-assu-, abstract noun suffix, probably from the same root as Latin -tudo (see -tude).