Anatoly Liberman, renowned linguist and etymologist, traces the history of pretty from its Low German and Icelandic origins to its current meaning in English as an adjective, pleasing to the senses but not particularly striking, and as an adverb; moderately sufficient or degree e.g. "pretty good", "pretty important", "pretty bad".
The root of pretty, which must have sounded approximately like prat, meant “trick.” Judging by the cognates of pretty in Dutch, Low (Northern) German and Old Icelandic, the adjectives derived from this root first meant “sly, crafty, roguish, sportive.” […] Back in Middle English, the oldest recorded meaning developed from “crafty, wily, artful” to “clever, skillful” and “pleasing, fine, proper.” The original sense was forgotten.
[…] The line between “proper; physically fit” and “good-looking” is easy to cross. Thus, handsome, so obviously derived form hand and some with the meaning “handy, easy to handle,” soon changed to “apt, happy; considerable” and “beautiful” (“handsome is as handsome does”). Likewise, clever seems to have been coined with the meaning “brisk, sprightly,” but in the 17th century it could also mean “handsome.” Somewhere in this loose conglomeration of senses, we usually find “considerable.” The most colorless of them all, it allows us to use the adverb pretty in phrases like pretty dark and pretty scary, in which the idea of prettiness is suppressed and pretty means “quite.” Only a deliberate joke, a combination like pretty ugly makes one aware of how incongruous such word groups are.
Oxford University Press Blog
Etymonline has an entry for pretty-boy, emphasis in bold mine.
1885 as an adjective, 1888 as a noun, from pretty (adj.) + boy (n.).
In Middle English a pretty man was "a worthy or clever fellow."
The 9th century meaning of pretty; cunning, clever, skilful, persisted until the 19th century
In the end, however, it was a very pretty shot, right across the chasm; killed first fire, and the brute fell headlong into the brook…
1877, Bismarck his Authentic Biography by Hesekiel and Taylor
The shift from a cunning, astute or skilful man (pretty-man) to someone gallant (brave) and "manly" in Middle English is an almost organic segue.
The expression, pretty boy, has not become obsolete but today it conveys the rather effeminate beauty of a young man or his physical (and youthful) attractiveness.