Universal properties of tensor product of Lie algebra representations.
Note that every bilinear map $f: V\times W \rightarrow U$ induces (and conversely, can be recovered from) a linear map
$$\tilde f:V \rightarrow \mathrm{Hom}(W,U)$$ $$v \mapsto [w \mapsto f(v,w)].$$
Now when all of $V,W,U$ are $\mathfrak g$-modules, I claim that your condition
$f(xv,w)+f(v,xw)= xf(v,w)$
is exactly the same as demanding that
$\tilde f$ is a homomorphism of $\mathfrak{g}$-modules;
for which I have to define a $\mathfrak g$-module structure on the full set of linear homomorphisms $\mathrm{Hom}(W,U)$.
Namely, for any two $\mathfrak g$-modules $W,U$, one makes $\mathrm{Hom}(W,U)$ into a $\mathfrak g$-module by defining $x \cdot l$ (for $x\in \mathfrak g$, $l \in \mathrm{Hom}(W,U)$) as the map $$w\mapsto x(l(w))-l(xw).$$ Note that the underlying vector space is really the full set of linear homs; this is made so that those homomorphisms which are $\mathfrak{g}$-equivariant are exactly the ones fixed by this action. Note that in the special case you describe in the question, where $U$ is the ground field (with trivial $\mathfrak g$-action), this action gives the standard definition of the dual representation. So all this neatly generalises this special case, where, as you write, the condition translates to $\tilde f$ being a homomorphism of $\mathfrak g$-modules $V \rightarrow W^\ast$. (And if one wants more motivation for the general case, I guess this action is kind of the derived version of what on a group level would be something like $g(f(g^{-1}\cdot))$, but I'm not sure about that.)
So one could define the tensor product of two $\mathfrak g$-modules $V, W$ together with the bilinear map $\phi_{V,W}: V\times W \rightarrow V\otimes W$ categorically as:
For any bilinear map $f: V \times W \to U$ to any $\mathfrak g$-module $U$ such that $\tilde f:V \rightarrow \mathrm{Hom}(W,U), v \mapsto [w \mapsto f(v,w)]$ is a homomorphism of $\mathfrak g$-modules, there is a unique homomorphism of $\mathfrak g$-modules $\hat{f}: V \otimes W \to U$ such that $f = \hat{f} \circ \phi_{V,W}$.
By the way, going to the tensor product now turns this into the usual adjoint relation between tensor product and homs,
$$\mathrm{Hom}_{\mathfrak g}(V\otimes W, U) \simeq \mathrm{Hom}_\mathfrak{g}(V, \mathrm{Hom}(W,U)),$$
again with the aforementioned action on the full linear $\mathrm{Hom}(W,U)$ inside the RHS; and to be honest, first looking at this and insisting "this must be true, so what's the $\mathfrak g$-action on that Hom set?" gave me the idea for this answer.