when does $f(a)^{f(b)}=f(a^b)$? 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
 A: 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.
A: Assume $a,b>0$ so that the RHS makes sense. Let $\mathcal{P}=(0,1),\;\mathcal{Q}=(1,\infty)$, noting that $f(1)=1$. 
If $f(s)=1$ for some $s\in\mathcal{P}$, then for all $y,\;f(s^y)=1 \Rightarrow f(r)=1$ over $\mathcal{P}$. However, then for $y\in \mathcal{P}:\;f(x^y)=f(x) \Rightarrow f=\mathcal{C}$, and hence $f=1$ over $\mathbb{R}^+$. Similarly if $f(s)=1$ for some $s\in\mathcal{Q}$ then $f=1$ over $\mathbb{R}^+$. In a similar vein, suppose there exist distinct $x_0,y_0\in \mathcal{P}$ such that $f(x_0)=f(y_0)\neq 1$ then $f(x_0)^{f(r)}=f(y_0)^{f(r)} \Rightarrow f(x_0^r)=f(y_0^r)$ which implies $f(x)=\mathcal{C}$ and since $\mathcal{C}=\mathcal{C}^{ \mathcal{C}}\Rightarrow \mathcal{C}=\pm 1$ we have $f=1$ over $\mathcal{P}$, which, as previously demonstrated, implies $f=1$ over $\mathbb{R}^+$. Similarly for the case $x_0,x_1\in\mathcal{Q}$. Hence if $f$ is not injective it is $1$ everywhere. 
Naturally, we now assume $f$ is injective. 
Observe that $f(z^{y^x})=f( z)^{f(y)^{f(x)}}\Rightarrow f(z^{y^n})=f( z)^{f(y)^{f(n)}} $ but also that inductively, we have $f(z^{y^n})=f(z)^{f(y)^n}$. Combining these facts, $f(n)=n$ for positive integers $n$. Hence we have $f(x^n)=f(x)^n$. Now suppose that $f(x)>x$ over $(a,b)\subset\mathcal{Q},$ then by the preceding statement, $f(x^n)>x^n$ over $(a^n,b^n)$ and hence the inequality is satisfied over arbitrarily large intervals, which contradicts $f(n)=n$. Similarly if $f(x)<x$ over any subinterval of $\mathcal{Q}$. Hence we must have $f(x)=x$ over $\mathcal{Q}$. Now assuming $f(x)>x$ over $\mathcal{P}$, our preceding proposition would imply that for $y\in\mathcal{Q}$ and $x\in\mathcal{P}:\; y^x=f(y^x)<f(y)^{f(x)}=f(y^x)$ which is absurd. Similarly if $f(x)<x$ over $\mathcal{P}$. Hence $f(x)=x$ over $\mathcal{P}$ as well.
Therefore $f(x)=1$ or $f(x)=x.$
