The result is trivial if $x=\mathbf{0}$, as we then have that $x$ is a nonnegative real scalar multiple of $y$ and we have equality. Assume $x\neq \mathbf{0}$.
Look carefully at the proof of the Cauchy-Schwarz inequality:
Express $y$ as $\alpha x + z$, where $\langle x,z\rangle = 0$. This can always be done by letting $\alpha = \frac{\langle x,y\rangle}{\langle x,x\rangle}$ and $z=y-\alpha x$.
Then $\begin{align*} \langle y,y\rangle &= \langle \alpha x+z,\alpha x+z\rangle\\ &= \alpha\overline{\alpha}\langle x,x\rangle + \alpha\langle x,z\rangle + \overline{\alpha}\langle z,x\rangle + \langle z,z\rangle\\ &= |\alpha|^2\lVert x\rVert^2 + \lVert z\rVert^2\\ &\geq |\alpha|^2\lVert x\rVert^2, \end{align*}$ with equality if and only if $z=\mathbf{0}$. Since $\alpha = \frac{\langle x,y\rangle}{\langle x,x\rangle} = \frac{\langle x,y\rangle}{\Vert x\rVert^2},$we conclude that $\lVert y\rVert^2 \lVert x\rVert^2 \geq |\langle x,y\rangle|^2$ with equality if and only if $z=\mathbf{0}$ (i.e., if and only if $y$ is a scalar multiple of $x$).
Now for the triangle inequality, we have $\begin{align*} \lVert x+y\rVert^2 &= \langle x+y,x+y\rangle\\ &= \langle x,x\rangle + \langle y,y\rangle + 2\mathscr{R}e\langle x,y\rangle\\ &\leq \lVert x\rVert^2 + \lVert y\rVert^2 + 2|\langle x,y\rangle| \tag{1}\\ &\leq \lVert x\rVert^2 + \lVert y\rVert^2 + 2\lVert x\rVert\lVert y\rVert \tag{2}\\ &= (\lVert x\rVert + \lVert y\rVert)^2. \end{align*}$
Now, $(1)$ is an equality if and only if $|\langle x,y\rangle|=\mathscr{R}e\langle x,y\rangle$, which occurs if and only if $\langle x,y\rangle = \alpha\lVert x\rVert^2$ is a nonnegative real; which occurs if and only if $\alpha$ is a nonnegative real; and $(2)$ is an equality if and only if $z=\mathbf{0}$. Thus, writing $y=\alpha x +z$ with $\langle x,z\rangle = 0$, we conclude that we have equality if and only if $z=\mathbf{0}$ and $\alpha$ is a nonnegative real number.
In summary, equality holds if and only if $x=\mathbf{0}$ (hence is equal to a nonnegative real scalar multiple of $y$), or if $y=\alpha x$ with $\alpha$ a nonnegative real number. That is, if and only if one of $x$ and $y$ is a nonnegative real scalar multiple of the other.