When does the sheaf cohomology of a topological space vanish? The question is in the title. A more precise formulation is:
Let $X$ be a topological space. When does $H^i(X,F) = 0$ for all $i > 0$ and all abelian sheaves $F$ on $X$?
The obvious example is a discrete space. I'd be happy with a characterization of compact Hausdorff topological spaces $X$ satisfying the above property.
Edit: Following Georges Elencwajg's answer, I would like to clarify that these spaces will be quite pathological from the viewpoint of classical topology. Nevertheless, I do not know a single example which does satisfy the above vanishing property and is not discrete. For example, does the Cantor set have this property?
 A: 0)  I would guess that the compact spaces you are looking for are extremely rare.   
1)  For example the extremely simple contractible space $I=[0,1]$ is not suitable:
Consider the inclusion $j\colon U=(0,1)\hookrightarrow I
$ and take on $I$ the sheaf$j_!(\mathbb Z_U)$,  the constant sheaf $\mathbb Z_U$ on $U$    extended to $I$ by zero.
Claim:  $H^1(I,F)\cong\mathbb Z$
Proof of claim:
Consider the open embedding  $i:F=I\setminus U\hookrightarrow X$ and the short exact sequence of sheaves on $I$ (see Hartshorne's Algebraic Geometry, Exercise I.19, page 68)
: $$0\to j_!\mathbb Z_U\to \mathbb Z_I\to i_*\mathbb Z_F\to 0$$ Taking the corresponding long exact sequence in cohomology we get the fragment $$0\to \Gamma(I,j_!\mathbb Z_U) \to \Gamma(I,\mathbb Z_I)\to \Gamma(I,i_*\mathbb Z_F)\to H^1(I,j_!\mathbb Z_U) \to    H^1(I,\mathbb Z_I)     $$
Since $\Gamma(I,j_!\mathbb Z_U)=0$ and 
 $H^1(I,\mathbb Z_I)=H^1_{\operatorname {singular}}(I,\mathbb Z)=0$ the above fragment becomes $$0\to 0\to \mathbb Z \to \mathbb Z^2\to H^1(I,j_!\mathbb Z_U) \to   0 $$   so that  $H^1(I,j_!\mathbb Z_U)\cong \mathbb Z\neq 0$
2) There is a very similar statement in scheme theory saying that $H^1(\mathbb A^1_k,j_!(\mathbb Z_U))=\mathbb Z$, where now $U$ is the complement of two rational points on the affine line $\mathbb A^1_k$: see Hartshorne's Algebraic Geometry, Exercise III 2.1      
3) Of course on afffine schemes, quasi-coherent sheaves have zero cohomology in positive degree, but that is not a purely topological statement and as shown in the example 2) above does not apply to arbitrary sheaves of abelian groups: even theorems by Serre necessitate some hypotheses!
