Care to be taken while connecting 220 VAC to MCU pin
The second circuit will not work. In fact, it will fail in spectacular fashion.

Microcontroller GPIOs are not 220V-tolerant. Connecting 220V to a microcontroller will destroy it -- and probably make it catch fire! -- and is likely to cause collateral damage to other parts of your circuit as well.

Use an optocoupler. If you need the circuit to work at 120V as well, increasing the value of  R185 (the collector pulldown) may allow the optocoupler to "turn on" with a lower current.