The notion of dimension I prefer most is right global dimension, but the question can also be asked for other notions (e.g. weak dimension, injective dimension, Krull dimension). Letting $d$ be whichever dimension you pick, the question then becomes:

Let $A$ and $B$ be $R$-algebras. When is $d(A\otimes_R B) = d(A)+d(B)$?

This question was addressed in the '50s by Eilenberg et al and Auslander. The first proved this result for $R$ commutative and $B$ is a ring of matrices, polynomials, or rational functions. The second proved it for $R$ a field and $A,B,A\otimes B$ semiprimary algebras of finite global dimension. In 1996 Vladimir Bavula came up with some different sufficient conditions on $A$ and $B$ when $R$ is a field but they seem much more complicated. I can't find anything on the problem since then, so any newer references would be much appreciated. Generally I turn to Weibel or Lam for questions like this, but neither book mentions anything. At this moment I'm mostly asking out of pure curiosity, so I'm fine with any assumptions on $R$. Depending on the answers I get, I might try to say something about ring spectra and then I'd have to be much more careful about hypotheses. The case where $R$ is a field has been done a lot, so perhaps $R$ could just be a commutative ring or commutative noetherian. Whatever gives a nice answer.

Here's what seems to be known. For $d =$ weak dimension or Krull dimension, $d(A\otimes B) \geq d(A)+d(B)$ and this also holds for left-Noetherian algebras $A$ and $B$ in the case where $d$ is left global dimension. One case where equality fails is $A = B =$ Division ring of $K[x_1,\dots,x_n]$ and $d =$ left global dimension. Then $d(A\otimes_K B) = n$ but $d(A)=d(B)=0$.

If $K$ is algebraically closed and $A$ and $B$ are finite dimensional $K$-algebras then gl.dim$(A\otimes B)=$ gl.dim$(A)+$ gl.dim$(B)$

Eilenberg et. al give the following as Proposition 10: If $K$ is a field then

l.gl.dim$(A)+$ weak dim$(B) \leq$ gl.dim$(A\otimes B) \leq$ l.gl.dim$(A) + $ dim$_K(B)$, and

l.proj.dim$(A) +$ weak dim$(B)\leq$ dim$_K(A\otimes B) \leq$ dim$_K(A) +$ dim$_K(B)$.

So this theorem reduces the problem to finding when weak dimension (as a ring) equals dimension as a $K$-algebra. It's not true in general that dim$_K(A\otimes_R B) =$ dim$_K(A)+$ dim$_K(B)$, e.g. if $A$ and $B$ are locally separable algebras over $K$ with $[A:K]=[B:K]=\infty$ then $dim_K(A)=dim_K(B)=dim_K(A\otimes B)=1$ because $A\otimes B$ satisfies the same properties just listed for $A$ and $B$.