The ice on the outside doesn't in itself affect performance of the A/C but it could indicate a problem with the A/C.
The unit outside is the condenser of the A/C. The hot gas from the compressor should be going through the large tube where it is condensed (becomes liquid). The liquid moves through the small pipe to the evaporator which is the cold unit somewhere inside. The evaporation should occur in the evaporator. The ice on the tube indicates that you are getting evaporation in the liquid-return tube. That could mean that you have too little refrigerant in the system.
The ice means that the suction of the air conditioner is operating below the freezing point, which will cause loss of capacity and high electrical consumption. It can also cause ice to form on the evaporator which will further decrease capacity and increase electrical consumption.
I would have the system checked and serviced if required.