The parallelogram law holds if and only if the norm is induced by an inner product. Namely, if $\Vert \cdot \Vert$ satisfies the parallelogram law then
$$\langle x, y \rangle := \frac{1}{4} \Vert x+y \Vert^2 - \frac{1}{4} \Vert x-y \Vert^2$$
defines an inner product that induces $\Vert \cdot \Vert$.
There are Banach spaces that do not satisfy the parallelogram law, e.g. $\mathbb R^n$ with the $\ell^p$-norm
$$\Vert (x_1,\ldots,x_n)\Vert_p = (|x_1|^p + \ldots + |x_n|^p)^{1/p}$$
for $n \geq 2$ and $p \neq 2$ (take $x = (1,0,0,\ldots,0)$ and $y = (0,1,0,\ldots,0)$ to see that the parallelogram law fails).