I first thought of adding this answer under my other one, but since the two answers actually have nothing to do with each other it was just turning out to be confusing. This one is a little broader in scope.
Suppose $f$ is a function that satisfies $f(a)+f(b)+f(c)=f(a)f(b)f(c)$ whenever $a+b+c=\pi$. Define $g(x)=f(x+\pi/3)$, so that $g$ now satisfies
$$g(a)+g(b)+g(c)=g(a)g(b)g(c)$$
when $a+b+c=0$. (This just helps to make the equations more transparent later.)
Now $0+0+0=0$, so $3g(0)=g(0)^3$, so $g(0)$ is either $0$ or $\pm\sqrt3$.
Let's consider the case $g(0)=0$.
We have $a+(-a)+0=0$, so $g(a)+g(-a)=0$, that is, $g$ is an odd function.
Using this fact, we take $(a+b)+(-a)+(-b)=0$ and find that
$$g(a+b)-g(a)-g(b)=g(a+b)g(a)g(b)$$
so
$$g(a+b)=\frac{g(a)+g(b)}{1-g(a)g(b)}.$$
Define $x\oplus y=(x+y)/(1-xy)$. One can verify that $\oplus$ is commutative and associative; in fact, it defines an abelian group operation on $\mathbb R$ with identity $0$. Actually, it's just the addition rule for tangents: $\tan(a+b)=(\tan a+\tan b)/(1-\tan a\tan b)=\tan a\oplus\tan b$.
So now, assuming $g(0)=0$, we have found that our equation is equivalent to
$$g(a+b)=g(a)\oplus g(b)$$
where $(\mathbb R,\oplus)$ is an abelian group. This leaves us in a place similar to Cauchy's functional equation, $g(a+b)=g(a)+g(b)$, except with $g(a)+g(b)$ replaced by a different group operation. We can still follow the steps to its solution pretty closely:
- Pick any value for $g(1)$. This determines $g(n)=g(1)\oplus\cdots\oplus g(1)$ for all $n\in\mathbb N$. If $g(1)=\tan\theta$, then $g(n)=\tan n\theta$.
- You can certainly extend this function to $\mathbb Q$ in the obvious way by $g(q)=\tan q\theta$, but there are arbitrarily many other extensions: for example, define $\theta'=\theta+k\pi$ for any chosen $k\in\mathbb Z$, and let $g(q)=\tan q\theta'$. (I feel it might even be possible to construct extensions which aren't identical to $\tan q\theta'$ for any $\theta'$, even just on the rationals, but I don't know enough number theory to prove it. I've asked for help in another question.)
- Things get really interesting when you look at $\mathbb R\setminus\mathbb Q$, because the value of $g(1)$ doesn't tell us anything about the value of $g$ at any irrational number. If you accept the axiom of choice, there exists a Hamel basis for $\mathbb R$ over $\mathbb Q$, that is, a set $A\subset\mathbb R$ such that every real number $x$ can be uniquely expressed as rational linear combination of elements of $A$. Now for each basis element $a\in A$, fix $g$ on $a$ and all its rational multiples using (1) and (2). Then for any $x\in\mathbb R$, express it in the basis,
$$x=q_1a_1+\cdots+q_na_n$$
for $q_i\in\mathbb Q$, $a_i\in A$ (note that $n$ varies with $x$, but is always finite). Define
$$g(x)=g(q_1a_1)\oplus\cdots\oplus g(q_nq_n).$$
So yes, you can have a heck of a lot of solutions. However, most of them will be incomprehensibly discontinuous. If you require the function to be continuous (except at a countable number of points, of course), I expect that only linear transformations of $\tan$ will remain, but I don't know how to prove it.
(Also, I haven't considered the cases $g(0)=\pm\sqrt3$, but I assume they'll be similar to the above...)
(Also also, if you don't assume the axiom of choice, then apparently it's hard to say much about Cauchy's functional equation. See the links under "For the role of AC in this result" in this answer.)