Let $f(z)$ be entire function. Show that if $f(z)$ is real when $|z| = 1$, then $f(z)$ must be a constant function using Maximum Modulus theorem
The function $g:z\mapsto e^{if(z)}$ is entire. Since $f$ is real on the unit circle $\mathbb{S}^1$, it turns out that $|g|=1$ on this set. But since $g$ is entire, using the Maximum Modulus Theorem, we know that $|g(z)| \leq 1$ for all $|z| \leq 1$. This means that (using your notations: $f(z)=u(z)+iv(z)$) $v \geq 0$ for $|z| \leq 1$. Same reasoning with $h:z\mapsto e^{-if(z)}$ leads to $v \leq 0$ on the unit disk and hence $v(z)=0$ on the unit disk, that is $f$ takes only real values on the whole unit disk which happens only if $f$ is constant (open mapping theorem).
Ayman
The maximum modulus principle says that $|g(z)|=|e^{if(z)}|$ attains its maximum for $D=\{ |z| \leq 1 \}$ on the boundary.
Thus
$$|e^{if(z)}| \leq 1 \,;\, \forall |z| \leq 1 \,.$$
Applying it to $h(z)=|e^{-if(z)}|$ you get again
$$|e^{-if(z)}| \leq 1 \,;\, \forall |z| \leq 1 \,.$$
Now,
$$e^{-if(z)}=\frac{1}{e^{if(z)}} \,.$$
Plug this in the second identity and you are done.