How do auxochrome groups work?
Generally speaking, the typical auxochromic groups possess (at least) one pair of non-bonded $n$-electrons and -- if taken alone -- do not absorb in the UV.  If attached, for example to a benzene ring, their pair(s) of $n$-electron interact(s) with the $\pi$-electrons, and the delocalization of the $\pi$-system is extended.

Now the catch:


Bathchromic auxochromic groups (like the mentioned $\ce{-OH}$ and $\ce{-NH2}$) increase the electron density in the $\pi$-system. This is typically caused by a strong $+M$-effect. As they lower the excited $\pi^*$-level, a longer wavelength is needed for the excitation along $\pi{} \rightarrow {} \pi^*$, hence the redshift.
In contrast to the former, substitution equally may alter the $n \rightarrow{} \pi^*$ transition, inducing the opposite effect, moving the absorption towards higher absorption (blue) and a hypsochromic shift.  One example is the to compare the absorption of indigo yielding "jeans blue" with 6,6'-dibromoindigo, main constitutent of tyrian purple. A second, that heteroatoms next to a $\ce{C=O}$ carbonyl group induce a hypsochromic shift like in the case of acetaldehyde example here in comparison to acetic acid here


Note the use of the terms of "bathochromic shift" and "hypsochromic shift" along solvatochromism.