A high input impedance makes your opamp take
only the input voltage from its source and not any
current. (Imagine your input source as an ideal source
in series with a resistance which is the internal resistance
of the source; your opamp input impedance adds to this
resistance and causes a voltage drop between the input
source and the actual opamp input, if your opamp has
low input resistance).
Similarly, if your opamp has high output impedance,
a part of the opamp output swing is wasted as a drop
in the output resistance (again imgine the output as a
ideal source in series with a resistance).