These functions are called harmonic functions. One the simplest examples is $f(x,y)=xy$.
More generally, the real part of any holomorphic function $\mathbb C\to \mathbb C$ is a harmonic function $\mathbb C\to \mathbb R$.
Added later:
As mentioned by Gerald, harmonic functions are characterized by the property that $$\int_0^1f(z+re^{2\pi\theta})d\theta=f(z),\qquad \forall r\ge 0,\quad \forall z\in \mathbb C.$$ I don't know whether that property for $r=1$ implies that property for all $r\ge 0$.
Partial answer to the edited question:
If you require the function to be bounded, then I think that yes, that should force it to be constant. [Liouville's theorem][1] states that any bounded holomorphic function $\mathbb C\to \mathbb C$ is constant. There is also a version of Liouville's theorem for harmonic functions, so yes: the function is constant.
Gap in the argument:
▹ why is the function harmonic?