how do the micro-inverters stay in sync(phase-lock) in a grid-tied residential solar panel system
It happens automatically when the inverter tries to synthesise a 'negative resistor'.
Consider how you take power out of a grid. You connect a resistor to it. Current flows proportional to the voltage. If you want to draw a certain power, you connect a certain value resistor.
The same thing happens in reverse when a grid-tied inverter wants to feed a certain amount of power into the grid. That amount of power is chosen by, let's say, the present value of its MPPT. From the power, and the nominal line voltage, we can derive a negative resistance which will deliver that.
It measures the instantaneous terminal voltage, then forces a current of V/-Rneg into the grid. As the voltage changes throughout the cycle, so the current forced into it changes. As it looks like a resistor, the current is always in phase with the voltage, and the power factor is 100%. This current for voltage computation can be done in analogue components, or using a fast enough DSP.