An intermediate result needed in proving the existence of quotients of a ringed topological space by a group Setting up notation:
Let $G$ be a group acting on a scheme $(X, \mathcal{O}_X)$, so that for all $\sigma \in G$ we have a sheaf morphism $\sigma^{\#}: \mathcal{O}_X \to \sigma_* \mathcal{O}_X$ such that $(\sigma \tau)^{\#} = \sigma_*(\tau^{\#}) \circ \sigma^{\#}$. In the category of ringed topological spaces, there is a unique morphism $(p,p^{\#}): (X,\mathcal{O}_X) \to (Y,\mathcal{O}_Y)$ such that every morphism $(f,f^{\#}): (X, \mathcal{O}_X) \to (Z,\mathcal{O}_Z)$ with $f \circ \sigma = f$ for all $\sigma$ factors through $(p,p^{\#})$. $(Y,\mathcal{O}_Y)$ (along with $p$) is the quotient of $X$ by $G$ and can be realised as follows: $Y = X/G$ as topological spaces, $p$ is the quotient map, $\mathcal{O}_Y(V) := \mathcal{O}_X(p^{-1}(V))^G$, and $p^{\#}_V: \mathcal{O}_X(p^{-1}(V))^G \to \mathcal{O}_X(p^{-1}(V))$ is just the inclusion. 
In proving that the proposed quotient does indeed satisfy the universal property above, it seems as if one must establish that, for $U \subset X$ open, restriction gives an isomorphism

$\rho: \mathcal{O}_X(p^{-1}p(U))^G \to \mathcal{O}_X(U)$

Since $p^{-1}p(U) = \bigcup_{\sigma \in G} \sigma U$, it makes sense to define, for $s \in \mathcal{O}_X(U)$, $s_{\sigma} = (\sigma^{-1})^{\#}_U(s) \in \mathcal{O}_X(\sigma U)$. Then, if one can show that $s_{\sigma}|_{\sigma U \cap \tau U} = s_{\tau}|_{\sigma U \cap \tau U}$ for all $\sigma, \tau$, then one can glue everything together to get a unique $t \in \mathcal{O}_X(p^{-1}p(U))$ with $t|_{\sigma U} = s_{\sigma}$. It is easy to show that $t$ is $G$-invariant and that $s \mapsto t$ is inverse to $\rho$.

How can we show that $s_{\sigma}|_{\sigma U \cap \tau U} = s_{\tau}|_{\sigma U \cap \tau U}$?

It seems to be a messy endeavour, one which I'm having trouble making fall out of my calculations.
Addendum:
Martin says below that the existence of the isomorphism $\rho$ is both not needed and not true in general, and, of course, I am inclined to believe him. In light of that, I want to fill in a gap above, so that I can ask what is needed instead. We want to construct a morphism $(\phi, \phi^{\#}): (Y, \mathcal{O}_Y) \to (Z, \mathcal{O}_Z)$ such that $f = \phi \circ p$ and $f^{\#} = \phi_*(p^{\#}) \circ \phi^{\#}$. $\phi$ is naturally given by $\phi([x]) = f(x)$, which is continuous, as $\phi^{-1}(W) = p(f^{-1}(W))$.

But then how do we define $\phi^{\#}: \mathcal{O}_Z \to \phi_*\mathcal{O}_Y$?

Since 
$f^{\#}_W: \mathcal{O}_Z(W) \to \mathcal{O}_X(f^{-1}(W))$
$\phi^{\#}_W: \mathcal{O}_Z(W) \to \mathcal{O}_X(p^{-1}pf^{-1}(W))^G$
$\phi_*(p^{\#})_W: \mathcal{O}_X(p^{-1}pf^{-1}(W))^G \to (\phi_* \mathcal{O}_X)(W)$
How can define the second morphism so that the first as a composition of the second two? I was thinking defined $\phi^{\#}$ to be $f^{\#}$ composed with the obvious incorporation of $\rho$. (On second thought, we don't need $\rho$ to be an isomorphism, but we certainly need an morphism $\mathcal{O}_X(f^{-1}(W)) \to \mathcal{O}_X(p^{-1}pf^{-1}(W))^G$, which still leaves us with the same problem.)
 A: No, the isomorphism you want to prove does not hold in general. And in fact one does not need it at all to derive the universal property.
Colimits in the category of ringed spaces can be constructed very simply: Take the colimit of the underlying spaces, and the limit of the underlying sheaves (with appropriate direct images; but essentially this is just the usual gluing for sections). The universal property is almost trivial. For locally ringed spaces, the same construction works, but one has to argue that the colimit of the underlying ringed spaces has local rings.
Quotients by group actions are special cases of colimits.
The category of schemes does not have all quotients. In most cases of interest (but not all) the quotient is just the quotient of the underlying locally ringed spaces, so that one just has to prove that it is a scheme. The most simple example where this happens is that the group is finite and that there is an open covering consisting of stable affine subsets.
Addendum:
Let $(f,f^\#) : X \to Z$ be a morphism which is $G$-invariant. Then $f$ is also $G$-invariant, so that $f$ extends to a continuous map $\phi : Y \to Z$, i.e. $\phi \circ  p = f$.
Let $V \subseteq Z$ be an open subset. Since the morphism $(f,f^\#)$ is $G$-invariant (as a morphism, not just the underlying map), the composition $\mathcal{O}_Z(V) \xrightarrow{f^\#} \mathcal{O}_X(f^{-1}(V)) \xrightarrow{g^\#} \mathcal{O}_X(g^{-1} f^{-1}(V))$, i.e. $\mathcal{O}_Z(V) \xrightarrow{f^\#}  \phi_* \mathcal{O}_X(p^{-1}(V)) \xrightarrow{g^\#} \phi_* \mathcal{O}_X(p^{-1}(V))$  does not depend on $g \in G$. This means that $f^\#$ factors as some morphism $\phi^\# : \mathcal{O}_Z(V) \to \phi_* \mathcal{O}_Y(V)$ followed by the inclusion. Then $(\phi,\phi^\#)$ is the desired extension of the morphism.
The same argument works more generally with colimits, where it is actually more transparent in my opinion. There is no choice how to define $\phi$ and $\phi^\#$.
