You need $U$ "contractible". In general $\Delta(S)$ is defined exactly as in the $1$-topos case: "take the constant presheaf valued at $S$ and sheafify it".
This theorem when one takes $U$ contractible is indeed also true for $\infty$-topos, but as far as I'm concerned this is the definition of a "contractible $\infty$-topos". To put in another way, if you want to see a proof it, it highly depends on what you mean by "U is contractible".
To give an example that should show you that 'connected' is not enough, consider sheaves on a nice topological space $X$ (typically a CW-complex), and take $S$ to be some Eilenberg-Mac lane space $S = K(\pi,n)$ (though any space would do).
Then in general, $\Delta(S)(U)$ for $U \subset X$ an open subspace is the space of maps from $U$ to $S$.
So as soon as as $H^n(U,\pi)$ is non zero, $\Delta(S)(U)$ has several connected component (corresponding exactly to elements of $H^n(U,\pi)$) while $S$ itself only has one connected component.
Note that in this special case (when $X$ is a nice topological space) it is easy to see that the formula $\Delta(S)(U) = S$ holds for all $S$ exactly when $U$ is contractible as a topological space in the usual sense. But, as mentioned before, for a more general topos you might want to clarify what "contractible" should mean in the first place... and depending on what definition you go for, it makes the question trivial or not.