First $\text{f}\left( 1 \right)=1$ beacause $\text{f}\left( a \right)^{\text{f}\left( 1 \right)}=\text{f}\left( a \cdot 1 \right)$, and $\log_{\text{f}\left( a \right)} \text{f}\left( a \right)^{\text{f}\left( 1 \right)} =\text{f}\left( 1 \right) \log_{\text{f}\left( a \right)} \text{f}\left( a \right) =1$
If $\text{f}\left( 2 \right) = c$ then $\text{f}\left( 2 \right)^{\text{f}\left( 2 \right)}=\text{f}\left( 4 \right)$ so $\text{f}\left( 4 \right)=c^c$ so there should be only one group of functions as a solution.
So if $\overbrace{x^{\text{...}^{x}}}^{\text{n times}}=2$ then $\overbrace{{\text{f}\left( x \right)}^{\text{...}^{{\text{f}\left( x \right)}}}}^{\text{n times}}={\text{f}\left( 2 \right)}$ then the $n$th super root of $c={\text{f}\left( x \right)}$, $n=\text{slog}_x2$ so ${\text{f}\left( x \right)}$=the $\text{slog}_x2$ root of c.
I am rather incompetent of my answer so if someone could look it over that would be great.
Super roots and slogs http://en.wikipedia.org/wiki/Tetration#Inverse_relations
I'm going to assume that $f$ is a function $\mathbb{R}^{>0} \to \mathbb{R}^{>0}$ [added: and that $f$ is continuous, see comments]: in this case, the only such functions are the constant function $f(x)=1$ and the identity function $f(x)=x$.
If $f(a^b)=f(a)^{f(b)}$ for all $a,b$, then also
$$f(a)^{f(bc)} = f(a^{bc}) = f((a^b)^c) = f(a^b)^{f(c)} = f(a)^{f(b)f(c)}$$
for all $a,b,c$. So if $f(a) \ne 1$ then we must have $f(bc)=f(b)f(c)$ for all $b,c$, so $f$ is a group homomorphism $(\mathbb{R}^{>0}, \times) \to (\mathbb{R}^{>0}, \times)$. The only such functions are of the form $f(x)=cx$.
But $f(1)=1$, so $f(x)=x$.
There's a chance that a similar result holds for other (co)domains; but since we're working with powers, it might get sticky.