The correct statement is that IF ${\cal H}(x)$ is scalar and $[{\cal H}(x),{\cal H}(x')]=0$ for $x,x'$ spacelike related THEN the $S$ matrix is invariant under the unitary representation $U_{(\Lambda, T)}$ of the orthochronous Poincaré group which implements the above action on ${\cal H}$.
In other words, if $U_{(\Lambda, v)} {\cal H}(x) U^{-1}_{(\Lambda, v)} = {\cal H}(v+\Lambda x)$ and the commutativity requirement is satisfied then
$$U_{(\Lambda, v)} S U^{-1}_{(\Lambda, v)} = S \quad \mbox{for every orthochronous transformation $(\Lambda, v)$}$$
The converse implication may be false (I am not sure, but dealing with interaction Larangians containing derivatives, everything becomes obscure).
However the proof of Weinberg's statement should be like this (I do not have the book but I guess he follows this route). Formally (i.e., without paying attention to mathematical details), $$S = \sum_{n=0}^{+\infty} \frac{(-i)^n}{n!}\int_{M^4} \cdots \int_{M^4} T({\cal H}(x_1) \cdots {\cal H}(x_n)) d^4x_1\cdots dx^4x_n$$$$S = \sum_{n=0}^{+\infty} \frac{(-i)^n}{n!}\int_{M^4} \cdots \int_{M^4} T({\cal H}(x_1) \cdots {\cal H}(x_n)) d^4x_1\cdots d^4x_n$$ Therefore $$U_{(\Lambda, v)} S U^{-1}_{(\Lambda, v)} = \sum_{n=0}^{+\infty} \frac{(-i)^n}{n!}\int_{M^4} \cdots \int_{M^4} U_{(\Lambda, v)} T({\cal H}(x_1) \cdots {\cal H}(x_n))U^{-1}_{(\Lambda, v)} d^4x_1\cdots dx^4x_n\:.$$$$U_{(\Lambda, v)} S U^{-1}_{(\Lambda, v)} = \sum_{n=0}^{+\infty} \frac{(-i)^n}{n!}\int_{M^4} \cdots \int_{M^4} U_{(\Lambda, v)} T({\cal H}(x_1) \cdots {\cal H}(x_n))U^{-1}_{(\Lambda, v)} d^4x_1\cdots dx_n^4\:.$$ If we manage to prove that
$$U_{(\Lambda, v)} T({\cal H}(x_1) \cdots {\cal H}(x_n))U^{-1}_{(\Lambda, v)}= T({\cal H}(x'_1) \cdots {\cal H}(x'_n)) \tag{1}$$ where $x'_k := v+\Lambda x_k$ we are done, because $d^4x_k = d^4x'_k$ since $(\Lambda, v)$ is an isometry.
The only apparent obstruction is that $T({\cal H}(x_1) \cdots {\cal H}(x_n)) \neq T({\cal H}(x'_1) \cdots {\cal H}(x'_n))$ because $\Lambda$ changes the temporal order of the arguments. This is not the case just because $\Lambda$ is orthochronous, so that it does not reverse the chronological order of causal vectors $x_k-x_h$, and the Hamiltonias commute when these vectors are spacelike. For instance, with $n=2$,
$$T(({\cal H}(x_1) ({\cal H}(x_2)) = {\cal H}(x_1){\cal H}(x_2) \quad \mbox{ if $t_1 \geq t_2$}$$
$$T(({\cal H}(x_1) ({\cal H}(x_2)) = {\cal H}(x_2){\cal H}(x_1) \quad \mbox{ if $t_2 \geq t_1$}$$
Therefore
$$UT(({\cal H}(x_1) ({\cal H}(x_2))U^{-1} = {\cal H}(x'_1){\cal H}(x'_2) \quad \mbox{ if $t_1 \geq t_2$}$$
$$UT(({\cal H}(x_1) ({\cal H}(x_2))U^{-1} = {\cal H}(x'_2){\cal H}(x'_1) \quad \mbox{ if $t_2 \geq t_1$}$$
If the temporal order of $t'_1,t'_2$ were the same as the time order of $t_1,t_2$ we would have
$$UT(({\cal H}(x_1) ({\cal H}(x_2))U^{-1}= UT(({\cal H}(x'_1) ({\cal H}(x'_2))U^{-1}$$
just by applying the definition. Actually the order may be reversed only if $x_1-x_2$ is spacelike. But this case is irrelevant since ${\cal H}(x_1) {\cal H}(x_2)) ={\cal H}(x_2) {\cal H}(x_1)$ in that case. This result extends to the case of $n$ points establishing that (1) holds true proving the assertion.