What happens if a voltage is applied to an output MCU pin?
If the MCU is outputting a different voltage from the voltage on the pin a large current will flow (50-100mA probably).  If left to persist this could damage the MCU.

You should design your hardware/software to avoid this situation.

If you can't avoid it you can put a series resistor to limit the current to a safe value - the max value for the ATMEGA328 is 40mA I believe.  This would imply a series resistor >125 ohm.