The category of ringed spaces
Let us look at $\mathbf{RS}/k$ for some commutative ring $k$. Let $X$ and $(Y_i)$ be ringed spaces over $k$ (i.e. the sheaves have values in commutative $k$-algebras). I claim that the canonical morphism
$$\textstyle \alpha : \coprod_i (X \times Y_i) \to X \times \coprod_i Y_i$$
is an isomorphism of ringed spaces. Let me first recall how products and coproducts look like in this category, see also MSE/1646202, or this pdf that I wrote when I was young.
The coproduct $\coprod_i Y_i$ has as underlying topological space the coproduct of the underlying topological spaces. So it's very easy to describe. The sheaf definition is (forced to be) $\mathcal{O}_{\coprod_i Y_i}(\coprod_i U_i) := \prod_i \mathcal{O}_{Y_i}(U_i)$ for open subsets $U_i \subseteq Y_i$. For every point $y \in \coprod_i Y_i$, say $y \in Y_i$, the stalk is
$$\mathcal{O}_{\coprod_i Y_i,y} = \mathcal{O}_{Y_i,y}.$$
This is a highly canonical isomorphism, which is why I just write it as equality.
The product $X \times Y$ of two ringed spaces has as underlying topological space the product of the underlying spaces. So it's the cartesian product with the product topology. The sheaf is made in such a way that we get $$\mathcal{O}_{X \times Y,(x,y)} = \mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y,y}$$
for the stalks. Explicitly, $\mathcal{O}_{X \times Y}(U)$ consists of those families $s \in \prod_{(x,y) \in U} \mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y,y}$ with the following property:
for every point $(x,y) \in U$ there is a standard open neighborhood $(x,y) \in V \times W \subseteq U$ and an element $t \in \mathcal{O}_X(V) \otimes_k \mathcal{O}_Y(W)$ that induces all $s_{x',y'}$ for $(x',y') \in V \times W$ in the obvious way.
This description of the sheaf is not really useful to work with. But for our proof we will only need the formula $\mathcal{O}_{X \times Y,(x,y)} = \mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y,y}$ (which is not entirely formal, actually, but very intuitive).
Coming back to the actual problem, from this discussion and the fact that $\mathbf{Top}$ is infinitary distributive it follows that $\alpha$ is a homeomorphism. It remains to prove that $\alpha^\sharp$ is an isomorphism of sheaves. For this it suffices to prove that for every point $p \in \coprod_i (X \times Y_i)$ the canonical homomorphism of commutative $k$-algebras
$$\mathcal{O}_{X \times \coprod_i Y_i,\alpha(p)} \to \mathcal{O}_{\coprod_i (X \times Y_i),p}$$
is an isomorphism. Choose the unique index $i$ with $p \in X \times Y_i$, and write $p = (x,y)$, where $x \in X$, $y \in Y_i$. By the discussion before we compute
$$\mathcal{O}_{X \times \coprod_i Y_i,\alpha(p)} = \mathcal{O}_{X,x} \otimes_k \mathcal{O}_{\coprod_i Y_i, y} = \mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y_i, y} = \mathcal{O}_{X \times Y_i, (x,y)} = \mathcal{O}_{\coprod_i (X \times Y_i),(x,y)},$$
and we are done. $\checkmark$
Interestingly, this proof didn't use that $\mathbf{CRing}^{\mathrm{op}}$, or rather $\mathbf{CAlg}_k^{\mathrm{op}}$, is distributive in any way.
The category of locally ringed spaces
Next, let us look at $\mathbf{LRS}/k$ for some commutative ring $k$. Probably a similar argument will work for $\mathbf{LRS}/S$, where $S$ is any locally ringed space, but I would like to keep it simple, since the notation will be already horrible enough.
As for coproducts of locally ringed spaces, we are lucky: they have the same easy description as for ringed spaces. However, the products are more complicated (see MSE/1033675, or again this old pdf):
Let $X,Y$ be two locally ringed spaces over $k$. The points of $X \times Y$ (we are not ignoring forgetful functors, which is why we don't need to write $X \times_k Y$, but yeah this is what it is) are triples $(x,y,\mathfrak{p})$, where $x \in X$, $y \in Y$, and $\mathfrak{p}$ is a "good" prime ideal of $\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y,y}$. Such a prime ideal is good if its preimage in $\mathcal{O}_{X,x}$ is the maximal ideal, and likewise for $\mathcal{O}_{Y,y}$.
Notice that then $\mathfrak{p}$ corresponds to a prime ideal $\mathfrak{p'}$ in the tensor product of fields $k(x) \otimes_k k(y)$. The spectrum of this tensor product is exactly what distinguishes this space from the product of ringed spaces, already in the edge case that $X$ and $Y$ just consist of a single point.
As for the topology, we have basic-open subsets $\Omega(V,W,g)$, where $V \subseteq X$, $W \subseteq Y$ are open and $g \in \mathcal{O}_X(V) \otimes_k \mathcal{O}_Y(W)$, defined as the set of those points $(x,y,\mathfrak{p})$ where $x \in V$, $y \in W$, and $g_{(x,y)} \notin \mathfrak{p}$, where the $(-)_{(x,y)}$ means to localize in each tensor factor.
I will not write down the long-winded definition of the structure sheaf. But it suffices to say that the stalk at a point $(x,y,\mathfrak{p})$ naturally identifies with
$$\mathcal{O}_{X \times Y,(x,y,\mathfrak{p})} = (\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y,y})_{\mathfrak{p}}.$$
You could even use this as a motivation for the points of $X \times Y$ in the first place: we somehow need to get a local ring out of the $\mathbf{RS}$-stalk $\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y,y}$. So why not localizing at a prime ideal? But at which one? Well ... all of them!
Back to the actual problem: we need to show that the morphism of locally ringed spaces $\alpha : \coprod_i (X \times Y_i) \to X \times \coprod_i Y_i$ is bijective, open, and induces an isomorphism on the stalks.
Bijectivity. A point in $X \times \coprod_i Y_i$ consists of $x \in X$, $y \in \coprod_i Y_i$ and a good prime ideal $\mathfrak{p}$ in $\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{\coprod_i Y_i,y}$. We have $y \in Y_i$ for a unique $i$, and then the tensor product identifies with $\mathcal{O}_{X,x} \otimes \mathcal{O}_{Y_i,y}$. The notion of being good also translates. So we end up with a point of $X \times Y_i$, for a unique $i$, i.e. a point in $\coprod_i (X \times Y_i)$.
Isomorphism of stalks. Consider a point $(x,y,\mathfrak{p})$ in $\coprod_i (X \times Y_i)$, say $y \in Y_i$, so that $\mathfrak{p}$ is good prime ideal of $\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y_i,y}$. We have $\alpha(x,y,\mathfrak{p}) = (x,y,\mathfrak{p}')$ where $\mathfrak{p}'$ is the image of $\mathfrak{p}$ under the canonical isomorphism between $\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y_i,y}$ and $\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{\coprod_i Y_i,y}$, which we treat as an identity. Based on this, we compute:
$$\mathcal{O}_{X \times \coprod_i Y_i, \alpha(x,y,\mathfrak{p})} = (\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{\coprod_i Y_i,y})_{\mathfrak{p}'} = (\mathcal{O}_{X,x} \otimes_k \mathcal{O}_{Y_i,y})_{\mathfrak{p}} = \mathcal{O}_{X \times Y_i,(x,y,\mathfrak{p})} = \mathcal{O}_{\coprod_i (X \times Y_i),(x,y,\mathfrak{p})}$$
Openness. Every open subset of $\coprod_i (X \times Y_i)$ is a union of open subsets in the $X \times Y_i$. Every open subset of $X \times Y_i$ is a union of basic-open subsets, i.e. of the form $\Omega(V,W,g)$, where $V \subseteq X$, $W \subseteq Y_i$, and $g \in \mathcal{O}_X(V) \otimes_k \mathcal{O}_{Y_i}(W)$. Since $W \subseteq Y_i$, there is a canonical isomorphism $\mathcal{O}_{Y_i}(W) = \mathcal{O}_{\coprod_i Y_i}(W)$, which gives us an element $g' \in \mathcal{O}_X(V) \otimes_k \mathcal{O}_{\coprod_i Y_i}(W)$ corresponding to $g$. It is now clear that $\alpha(\Omega(V,W,g)) = \Omega(V,W,g')$, which is open. $\checkmark$
Interestingly, this proof also didn't use that $\mathbf{CAlg}_k^{\mathrm{op}}$ is distributive in any way. It's vice versa. Applying the above result to (finitely many) affine schemes, we can deduce this fact. Not the most elementary proof, though, since this of course uses the duality between affine schemes and commutative rings.
It follows that $\mathbf{Sch}/k$ is infinitary distributive as well, since this category is closed under coproducts and finite limits taken in $\mathbf{LRS}/k$.