2 added 2 characters in body

This answer is in the context of sheaves of sets. If you meant sheaves of groups, please say so.

If you look at the 'espace etale' (wikipedia) of a sheaf $\mathcal{O}(X)^{op} \mathrm{Open}(X)^{op} \to Set$ (which is defined by taking the union of stalks and topologising appropriately - fibres of the canonical map to $X$ are then discrete spaces), then continuous maps of these over $X$ correspond to sheaf maps. The maps of stalks give a map of the underlying sets. An obvious sufficient condition that the collection of maps of stalks gives a map of sheaves is that this map is continuous.

(If you actually have a sheaf of groups, then you get a group object over $X$. All you need to check is the continuity - the homomorphisms of stalks give a homomorphism of the underlying set of the group object)

1

This answer is in the context of sheaves of sets. If you meant sheaves of groups, please say so.

If you look at the 'espace etale' (wikipedia) of a sheaf $\mathcal{O}(X)^{op} \to Set$ (which is defined by taking the union of stalks and topologising appropriately - fibres of the canonical map to $X$ are then discrete spaces), then continuous maps of these over $X$ correspond to sheaf maps. The maps of stalks give a map of the underlying sets. An obvious sufficient condition that the collection of maps of stalks gives a map of sheaves is that this map is continuous.

(If you actually have a sheaf of groups, then you get a group object over $X$. All you need to check is the continuity - the homomorphisms of stalks give a homomorphism of the underlying set of the group object)