They both have merits and the best option can come down to what is most appropriate for your system and application.
A couple of the main advantages that micro inverters have is that each solar panel has its own inverter so that if shade falls on one panel it does not shut down the output of all the panels which is often the case with a string inverter where the whole string containing the effected panel can pretty much be shut down – this extends to redundancy in the case of an inverter failure as well. As micro inverters are on the roof and attached to every solar panel it then converts the DC voltage to AC voltage on the roof and then sends power to your house.
String inverters are still the generally best option for really big arrays and systems where there are Batteries involved for storage, where it harnesses the solar which runs from the panels to the inverter in DC voltage (usually located in your garage) where it converts it to AC voltage and then sends power to your house.