Notation/Introduction:
Let $(X, \mathcal{O}_X)$ be a locally ringed space, $U \subseteq X$ an open and $p \in U$. Denote by $\mathfrak{m}_p \lhd \mathcal{O}_{X,p}$ the unique maximal ideal and $k_p=\mathcal{O}_{X,p}/\mathfrak{m}_p$ the residual field at $p$. Let $$ ev_p : \mathcal{O}_X(U) \to \mathcal{O}_{X,p} \to k_p \quad , \quad \quad p \in U $$ and denote $f(p) = ev_p(f) \in k_p$. Taking the product we define $$ ev = \mathcal{O}_X(U) \to \prod_{p \in U} \mathcal{O}_{X,p} \to \prod_{p \in U} k_{p} \quad, \quad \quad ev(f) = (f(p))_{p \in U} $$
The question is: when $ev$ is injective?
Well, let $f \in \mathcal{O}_X(U)$ such that $f(p) = 0$, $\forall p \in U$, then $f_p = \mathrm{stalk}_p(f) \in \mathfrak{m}_p = \mathcal{O}_{p, X} \setminus \mathcal{O}_{p, X}^{\times}$. So $f|_V \notin \mathcal{O}_X(V)^{\times}$ for all open $V \subseteq U$. Then what?
If all stalks $\mathcal{O}_{X,p}$ are fields then $ev$ is injective (because $\mathcal{O}_X$ is a separated presheaf), but it is too restrictive if $X$ is not discrete. For schemes I know that $X$ be reduced is a sufficient condition, but what about the general case of locally ringed spaces? The case of schemes is reduced to affine schemes and the proof relies on commutative algebra (the intersection of all primes is the nil radical), so I can't use those ideas now (I guess).
In some sense, this condition of $ev$ being injective is about understanding the abstract sheaf $\mathcal{O}_X$ as a sheaf of rings of functions (what sounds like a reasonable question to me).