When are there enough projective sheaves on a space X?
About Jon Woolf's answer, it seems to me that the condition that "$x$ is a closed point" was implicitly used: the extension by zero $Z_A$ is only defined for a locally closed subset $A$ (see e.g. Tennison "Sheaf theory," 3.8.6). So $X-x$ must be locally closed. How about the following trivial modification: instead of $Z_X$, consider the sheaf $i_\ast Z$, where $i$ is the inclusion of a point $x$ into $X$.
Suppose that $x$ does not have the smallest open neighborhood and $x$ has a basis of connected neighborhoods. Then $i_\ast Z$ is not a quotient of a projective sheaf $P$. Suppose otherwise. Then for any connected open neighborhood $U$ of $x$, the homomorphism $P(U) \to i_\ast Z(U)$ is zero. This implies that the homomorphism $P \to i_\ast Z$ is zero since it is equivalent to a homomorphism from the stalk $P_x$ to $Z$. Indeed, pick a neighborhood $V$ which is smaller than $U$. We have a surjection $Z_V \to i_\ast Z$. The homomorphism $P \to i_\ast Z$ must factor through $Z_V$, so $P(U) \to i_\ast Z(U)$ must factor through $Z_V(U)$. But $Z_V(U)=0$. This equality may fail if $U$ is not connected however.
So to summarize Jon Woolf and David Treumann, the category of sheaves of abelian groups on a locally connected topological space $X$ has enough projectives iff $X$ is an Alexandrov space.
Surely this must appear in some standard text. Anybody knows a reference? And what about non-locally connected spaces?
For ringed spaces $(X,\mathcal{O}_X)$ one direction is still clear: $X$ being an Alexandrov space implies you'll have enough projectives. But on reflection the other direction, $X$ being a locally connected space without minimal open neighborhoods implies you don't have enough projectives, appears to be rather tricky. One can think of some weird structure sheaves for which the above argument does not go through, in particular $\mathcal{O}_V(U)\ne 0$. So I still wonder what the answer is for ringed spaces.
The condition that each point has a minimal open neighbourhood is necessary and sufficient (as suggested by David Treumann above, see his answer for sufficiency).
Suppose $X$ is a topological space with a point $x$ such that any connected neighbourhood of $x$ contains a strictly smaller neighbourhood. Then the category of sheaves of abelian groups on $X$ does not have sufficient projectives.
Proof: Given a connected neighbourhood $U$ of $x$ find a strictly smaller neighbourhood $V$ and consider the cover $\{V , X-x\}$ of $X$. There is a surjection
$$Z_V \oplus Z_{X-x} \to Z_X$$
where $Z_A$ denotes the extension by zero of the constant sheaf with stalk $Z$ on the subspace $A$. If there are enough projectives then there is a projective cover $P \to Z_X$ of the constant sheaf. This must factorise through the above surjection. But by construction $Z_V(U) =0$ and $Z_{X-x}(U) = 0$ so
$$P(U) \to Z_X(U)$$
must be the zero map. By assumption on $X$ this is true for any connected neighbourhood $U$ of $x$ and so the stalk map
$$P_x \to Z_X,x = Z$$
is zero too. This contradicts the fact that $P \to Z_X$ is a projective cover.
Thinking about the coherent sheaf case, this resembles a question of Totaro. Is his paper The resolution property for schemes and stacks Totaro asks whether, for any finite type variety $X$, and any coherent sheaf $E$ on $X$, there is a vector bundle $V$ on $X$ with a surjection $V \to E$. This question is open and appears to be quite difficult.