Let $\mathbf{r}:[a,b]\to\mathbb{R}^2$ be a $C^2([a,b])$ regular curve. Is it true that $\mathbf{r}$ is convex if and only if its curvature $\kappa(t)\leq 0, \forall t\in [a,b]$ or $\kappa(t)\geq 0, \forall t\in [a,b]$ ?
By convex, I mean that $\mathbf{r}([a,b])$ lies on exactly one half plane formed by the tangent line in $\mathbf{r}(t_0),\ \forall\ t_0\in [a,b]$.
No. [N.B. the first part of this answer addresses the original version of the question where the assumption $\kappa \neq 0$ is made.]
The above two cases document the failure of the "only if" part of the statement. Note that if we modify the statement to read
the statement is true, which you can prove using the definition of the curvature as the derivative of the tangent vector.
The "if" part of the statement, namely the claim
is false also, without further qualifications. Consider the curve in $\mathbb{R}^2$ represented in polar coordinates by
$$ \theta(t) = t, r(t) = t $$
for $t\in [1,100]$
This curve is clearly not convex, yet the curvature is strictly signed. A corrected statement should involve a "local" caveat, in the sense that
For a sketch of the proof(s):