The condition $f(\bar A)\subseteq \overline{f(A)}$ for each $A\subseteq X$ can be taken as the definition of continuity (provided one defines a closure operator before one defines open sets, of course). Let's assume the
DEF $f:(X,\mathscr T)\to(Y,\mathscr U)$ is continuous if for each open $A\in Y$, $f^{-1}(A)$ is open in $X$.
We know that this is equivalent to
DEF* $f:(X,\mathscr T)\to(Y,\mathscr U)$ is continuous if for each closed $F\in Y$, $f^{-1}(F)$ is closed in $X$.
Then we have the
THM $f:(X,\mathscr T)\to (Y,\mathscr U)$ is continuous if and only if for each $A\subseteq X$, $f(\bar A)\subseteq \overline{f(A)}$
PROOF Suppose that $f$ is continuous. Given a subset $A$, we have $f(A)\subseteq \overline{f(A)}$, which means $A\subseteq f^{-1}f(A)\subseteq f^{-1}\overline{f(A)}$. This last set is closed, so $\bar A\subseteq f^{-1}\overline{f(A)}$, which means $f(\bar A)\subseteq \overline{f(A)}$.
Conversely, suppose that $f(\bar A)\subseteq \overline{f(A)}$ for each $A\subseteq X$. Let $F$ be closed in $Y$. Then $f(\overline{f^{-1}(F)})\subseteq \overline{f({f^{-1}(F)})}\subseteq \bar F=F $. Thus $\overline{f^{-1}(F)}\subseteq f^{-1}(F)$. Since the converse always holds, we have $f^{-1}(F)=\overline {f^{-1}(F)}$, so this set is closed and $f$ is continuous.
See this for more.