I'll answer the question for algebraic theories, or Lawvere theories, which is the context in which "commutative theories" are typically discussed. This question is then the topic of Johnstone's Collapsed toposes and cartesian closed varietiesCollapsed toposes and cartesian closed varieties.
As discussed in Section 4 therein, though the category of $T$-algebras for $T$ a commutative algebraic theory is canonically symmetric monoidal-closed, this canonical monoidal structure is not cartesian in general, even if the category of $T$-algebras is cartesian closed. We may ask when the canonical monoidal structure is cartesian.
Definition (Johnstone, Section 4). A hyperaffine algebraic theory is an algebraic theory $T$ such that every operation $p$ satisfies $p(x, \ldots, x) = x$ (i.e. $T$ is affine) and $p(p(x_1^1, x_1^2, \ldots, x_1^n), \ldots, p(x_n^1, x_n^2, \ldots, x_n^n)) = p(x_1^1, x_2^2, \ldots, x_n^n)$.
Theorem (Johnstone, Proposition 4.1). Let $T$ be a commutative hyperaffine algebraic theory. Then the canonical monoidal-closed structure on $T$ is cartesian. Furthermore, $T$ is a topos iff $T$ is isomorphic to the initial algebraic theory.
These theories may be characterised syntactically quite directly.
Proposition (Johnstone, Lemma 4.2 & Proposition 4.3). Every non-degenerate finitely generated commutative hyperaffine theory $T$ is isomorphic to one with a single $n$-ary operation $p$ satisfying the preceding equations (for $n > 0$). The category of $T$-algebras is equivalent to the category of $n$-fold cartesian products of sets.
When $n = 2$, this is the category of rectangular bands.
It should be noted that the first part of Proposition 4.1 may also be found in Proposition 2.3 of Kock's Bilinearity and cartesian closed monads.
In general, we have the following characterisation result for when a (single-sorted) algebraic theory $T$ has a cartesian-closed category of algebras. (Johnstone also discusses a semantic condition for $S$-sorted algebraic theories in Section 9, but does not give the syntactic characterisation.)
Definition (Johnstone, Section 1). An operation $p$ is strongly non-constant if, whenever we have an identity of the form $p(x_1, \ldots, x_n) = q(v_1(x_{\alpha(1)}), \ldots, v_m(x_{\alpha(m)}))$ and $p$ does not depend on $x_i$, then $q(y_1, \ldots, y_m)$ does not depend on any $y_j$ with $\alpha(j) = i$.
Theorem (Johnstone, Theorem 1.2). Let $T$ be a non-degenerate algebraic theory. Then the category of $T$-algebras is cartesian-closed iff every operation is strongly non-constant, and for every $n$-ary operation $p$, there exists an $m$-ary operation $q$, two $m$-tuples of unary operations $u_j, v_j$ ($1 \leq j \leq m$), and a function $\alpha : \underline m \to \underline n$ such that the following identities hold: $$q(u_1(y), \ldots, u_m(y)) = y$$ $$u_j(p(x_1, \ldots, x_n)) = v_j(x_{\alpha(j)}) \qquad (1 \leq j \leq m)$$
An elegant characterisation of cartesian-closure for varieties of anomic $S$-sorted theories (i.e. theories with no equations) is provided in Oles's When is a category of many-sorted algebras cartesian closed?.
Theorem (Oles, Theorems 1 & 7). Let $\Sigma$ be an $S$-sorted signature. The category of $\Sigma$-algebras is cartesian-closed (and furthermore a topos) iff $\Sigma$ is unary (i.e. every operation is unary).
To answer your first question directly: cartesian-closure of the category of $T$-algebras does not imply that $T$ is commutative. The answer to the second question is affirmative for algebraic theories.