Why did the Byzantines switch from Latin to Greek?
I believe the linguistic switch was base on demographics. During the reign of Justinian I, the Romans invented a method to compensate for the lack of tax revenues from the Balkans, and the lack of recruits by associating a rich province in their Eastern possessions (Anatolia, Middle East and Africa) that had been unaffected by the Barbarian invasions in the previous centuries with the Prefectures in the Lower Danube
That measure was unsustainable though. The lack of Latin speaking population in the Balkans to keep supporting Imperial efforts though recruitment and taxation was in full display during the next period before the usurpation of Emperor Maurice (602 AD). This last Emperor actually planned to repopulate the Balkans with Isaurian (Armenian) colonists from the East, but was assassinated before having the chance to implement his plans
As indicated on the linguistic distribution map proposed by the Jireček Line
three centuries of continuous stress of the Balkans starting from the Crisis of the Third Century affected mostly the Latin speaking population of the Roman Empire. From it, no traceable population survived in the Eastern Roman Empire past the Hunnic invasion, except of the small pocket in Illyricum (Dalmatian) which also got discontinued in 620 AD judging by the last Latin inscription found at Salona
In a nutshell, the transition to the Attic Greek (Medieval Greek) of the Roman Empire was caused by the lack of Latin speaking population in its territorial confines