Connection between Old English and Middle English words is uncertain, but if they are the same, meaning had shifted by c. 1400 to “manly, gallant,” and later moved via “attractive, skillfully made,” to “fine,” to “beautiful in a slight way” (mid-15c.). Ironical use from 1530s. For sense evolution, compare nice, silly. Also used of bees (c. 1400). “After the OE. period the word is unknown till the 15th c., when it becomes all at once frequent in various senses, none identical with the OE., though derivable from it” [OED].
Meaning “not a few, considerable” is from late 15c. With a sense of “moderately,” qualifying adjectives and adverbs, since 1560s.
All of these share a semantic similarity that arises from the dual uses of the word fair to mean both attractive and equitable/suitable according to law or custom (13th C per etymonline). The other two uses arise in the 16th century (pretty penny itself was later, though).
Old English fæger "pleasing to the sight (of persons and body features, also of objects, places, etc.); beautiful, handsome, attractive," of weather, "bright, clear, pleasant; not rainy," also in late Old English "morally good," from Proto-Germanic fagraz
From early 13c. as "according with propriety; according with justice," hence "equitable, impartial, just, free from bias" (mid-14c.).
With similar adverbial usage from the same time.
The semantic shift from fair meaning correct amount according to law to large enough and eventually large is easy.
Handsome and pretty seem to have come along for the ride a few centuries later as these became preferred words for fair/attractive.