In 2267, Khan Noonien Singh referred to Milton in reply to Captain Kirk's inquiry as to whether he could "tame a world." Unsure what Khan meant, Montgomery Scott later stated to Kirk, "It's a shame for a good Scotsman to admit it, but I'm not up on Milton." To which, Kirk replied, quoting from Paradise Lost a statement made by Lucifer when he fell into the pit, "It is better to rule in hell than serve in heaven." (TOS: "Space Seed")
In 2370, when Maques was injured by a rose in the USS Enterprise-D's arboretum, Counselor Troi recited a verse from Milton's Paradise Lost to him: "Flowers of all hue and without thorn the rose." (TNG: "Dark Page")
Why Scotty should have found it shameful for a Scotsman not to be "up on Milton" is unclear. His country and England were not merged into the kingdom of Great Britain until the 18th century, and Milton is – in every sense of the word – an English poet. If not nationalist, then, Scotty's embarrassment may be religious: Milton was strongly influenced by Calvinism in his years over on the European mainland, and Calvinism is a prime ingredient in Presbyterianism, a powerful force in Scotland's culture.
However, this is most likely a plot device to give Kirk a reason to explain the comment, as it is very likely that the audience would not be familiar with the quote from Paradise Lost.