What is so special about negative numbers $m$, $\mathbb{Z}[\sqrt{m}]$?
One way to think about this is in terms of the reduction theory of positive definite binary quadratic forms over $\mathbb{Z}$: see for instance Cox's book Primes of the form $x^2 + ny^2$, or, for a short introduction, these notes. The key result here is that for each positive definite primitive binary quadratic form there is a unique Minkowski-reduced form equivalent to it.
If you are looking at forms $x^2 + ab y^2$ with $1 \leq a \leq b$, $\operatorname{gcd}(a,b) = 1$, then you find that both
$q_1(x,y) = x^2 + ab y^2$ and
$q_2(x,y) = a x^2 + by^2$
are Minkowski reduced, so the class number of the quadratic order of discriminant $-4ab$ must be at least $2$. This is not the whole story, because you also have to deal with discriminants of the form $D \equiv 1 \pmod 4$, but a similar analysis can be done here. Anyway, this gives you some feel for what is different between imaginary and real quadratic fields: the associated binary quadratic forms behave very differently.
Added: After seeing Weaam's (correct) answer, I looked back at the question and saw that it is asking something easier than I had thought: the question asks why $\mathbb{Z}[\sqrt{-m}]$ is not a PID for certain integers $m > 0$. But as Weaam points out, it is easy to show that $\mathbb{Z}[\sqrt{-m}]$ is not a UFD for any $m > 2$: this also occurs in my lecture notes for the course I taught (more or less) based on Cox's book: see Corollary 6 of these notes (the first handout in the course). What I say above is also a complete solution to this question -- well, at least as long $m$ is not a square; in that case one could just argue that the ring is not integrally closed -- but is more complicated than is necessary. What I was indicating is that for squarefree composite $m > 0$, the class number of the full ring of integers of the imaginary quadratic field $\mathbb{Q}(\sqrt{-m})$ is greater than $1$. This does seem to be most easily handled by elementary reduction theory / genus theory, so far as I know. For yet another closely related result, see Landau's Theorem at the end of the latter set of notes.
Hint $\ $ Consider factorizations like $\rm\ \ \sqrt{-pq}\ \sqrt{-pq}\ =\: -p\:q\ $
Note too $\rm\ p\ |\ d\ \Rightarrow\ (p,\:\sqrt{d})^2\ =\ p\ (p,d/p,\sqrt{d})\ =\ (p)\ $ since $\rm\:d\:$ squarefree $\rm \Rightarrow\ (p,d/p) = 1\:$.
More generally, one can show that a quadratic number ring is a PID (or investigate its class group structure) by analysing the splitting or ramification of rational primes below the Minkowski bound. For example, this explains Euler's famous prime-producing polynomials.
One explanation as to why this is simpler for complex vs. real quadratic number fields has to do with the fact that norms reflect much of the multiplicative structure, and complex quadratic fields have simpler norms, being positive definite vs. indefinite sign for real quadratic fields. Thus, in the first example I mention above, it is very simple to show that $\rm\ \sqrt{-pq}\ $ is irreducible since otherwise $\rm\ r\ |\ \sqrt{-pq}\ \Rightarrow\ rr'\ |\ pq\ $ in $\mathbb Z\:,\:$ so $\rm\ rr' = p\:$ or $\rm\:q\:,\:$ contra $\rm\ r\:r' = m^2 + pq\ n^2\ $ takes only square values below $\rm\:pq\ (\Rightarrow n = 0)\:$. Notice how this proof depends crucially on the positivity of the norm form. In a real field we have instead $\rm\ rr' = m^2 - pq\:n^2\ $ which, having indefinite sign, thwarts the proof, e.g. in $\rm\ \mathbb Z[\sqrt 14]\ $ we have $\rm\ 2 = N(4 + \sqrt{14}),\,\ {-}7 = N(7 + 2\ \sqrt{14})\:,\:$ where $\rm\:N\:$ is the norm.
In fact non-UFD number rings are characterized by this property, viz. $\rm\ \sqrt{-pq}\ $ being irreducible but having norm splitting into two or more primes. Indeed, it's not difficult to show that a number ring is a UFD iff its irreducibles have prime power norms, i.e. exactly one rational prime $\rm\:p\:$ occurs in norms of irreducible elements $\rm\ N(\pi) = p^n\:.\:$ More generally one can show that in many favorable contexts (e.g. Galois) that a number ring enjoys unique factorization iff its monoid of norms does. For references (Bumby and Dade, Lettl, Coykendall) see my sci.math post on 19 Dec 2007.
By finding an irreducible that's not prime for d<-2 should suffice as a prime is the same as an irreducible in a PID.
A good candidate is 2 which is not prime in $Z[\sqrt{d}]$, since it divides $d(d-1)$ but not $\frac{d \pm \sqrt{d}}{2}$.
To show that 2 is irreducible assume to the contrary that $2 = \alpha \beta$ where neither a units.
Take the norm, but note that the $N(a + b\sqrt{d}) = a^2 - db^2$ is multiplicative, always nonnegative, and N(u)=1 iff u is unit, and units are +1, -1 which wouldn't be the case if d were positive, as Arturo Magidin suggested in a previous comment.
Then $N(\alpha)=N(\beta)=2$, i.e $a^2 - bd^2 = \pm 2$. Then you may deduce that if d<-2 then no such a or b exists, and the result follows.
Addendum:
Let d<-5 be squarefree such that d = pr, where p prime.
The ideal $(p, \sqrt{d})$ is not principal in $Z[\sqrt{d}]$.
Suppose $Z[\sqrt{d}]$ is PID, then $(p, \sqrt{d}) = (n)$ for some $n = a + b\sqrt{d}$.
Taking the norm, then $N(n) = a^2 - db^2$ divides d (inclusion of ideals).
If b = |1|. Then $a^2 \pm d$ divides d and a = 0. But then $N(n)=d$ divides $N(p)=p^2$, but d = pq. Case b >|1| is also trivial.
Case b = 0. Then $a^2$ divides d, and then $a=1$. Hence (n) = (1) = $Z[\sqrt{d}] = (p, \sqrt{d})$. Then $1 = px + \sqrt{d}y$ for x, y in $Z[\sqrt{d}]$, but then $ps - dt = 1$, which is impossible since d = pr.