There are good reasons for supposing that the relics which came to St Andrews were originally in the collection of Acca, bishop of Hexham, who took them into Pictish country when he was driven from Hexham (c. 732), and founded a see, not, as according to tradition, in Galloway, but on the site of St Andrews. Given that the church at Hexham had been founded by St Wilfrid, with his strong links to Rome, and more importantly that the church there was dedicated to St Andrew, this looks a tempting interpretation. The connection made with Regulus is, therefore, due in all probability to the desire to date the foundation of the church at St Andrews to an early a date as possible.
It has also been suggested that St Andrew's connection with Scotland may have been reinforced following the Synod of Whitby, of 663 when the Celtic church felt that St Columba had been "outranked" by St Peter and that Peter's brother would make a higher ranking patron. In 1320 the Declaration of Arbroath cited Scotland's conversion to Christianity by Andrew, "the first to be an Apostle".
The National Archives of Scotland website has an interesting, illustrated, piece about the use of the image of St Andrew as national patron and emblem: it can be viewed here.
After the Scottish War of Independence St Andrew continued as a national symbol, as in the Trinity Altarpiece by Hugo van der Goes of circa 1478-79 depicting the saint standing behind the kneeling figures of King James III and his son and successor, James Duke of Rothesay, the future King James IV.
However a somewhat similar scene with King James IV from his Book of Hours, now in Vienna, and dating to about the time of his marriage to Queen Margaret in 1503, shows St James the Great as his sponsor or patron: