Short version: it was done to emphasize the fact that romanians are of latin heritage, and not slavic. As scholars started to investigate the history and language, they realized the three countries - Wallachia, Moldavia and Transylvania - have a roman legacy and this had to reflect in the alphabet as well.
Detailed version: Dimitrie Cantemir (a Moldavian ruler from the 18th century) wrote in his encyclopedic work "Descriptio Moldaviae" (latin for "A description of Modavia") that until 1439 the latin alphabet was used in Moldavia. The oldest written text in romanian with a cyrillic alphabet dates to 1521 (The letter of Neacsu from Campulung to Hans Benker). Out of the 190 words used in it, 175 have a latin origin, even though they are written in cyrillic.
The main supporter of the cyrillic alphabet was the Orthodox church. It wanted to differentiate itself from the Roman-Chatolic church who used the latin alphabet and who was also trying to convert the 3 countries.
The transition will start with the Moldavian chroniclers Grigore Ureche, Ion Neculce, Miron Costin (lived in the XVI and XVII and XVIII centuries). They all asserted the Romance character of the language.
Throughout the XVII, XVIII and XIX century, the number of cyrillic characters in the alphabet was reduced from 43 (in 1688) to 33 (in 1787 by Ienachita Vacarescu ) and then to 28 (in 1828 by Ion Heliade Radulesc).
The publishers in Cluj, Brasov or Sibiu used latin characters in their printed works since the XVIII century - mainly for titles or sub-titles.
The first published work in romanian and with a latin alphabet is Samuil's Mincu "Carte de rogacioni" (english: "Prayer Book") from 1779.
Between 1830s - 1840s a transitional alphabet appears, containing both cyrllic and latin letters. This is more prevalent in the newspapers published at that time (Gazeta de Transilvania, Dacia literara, Gazeta Teatrului national, etc).
Starting with 1835, the Blaj typography in Transylvania only uses latin characters.
After the union between Moldavia and Wallachia in 1859, a law was passed (February 8th, 1860 by Ion Ghica) making the latin alphabet the default one for all government communications. This can be considered the moment when romanians switched completely to the latin alphabet.