Ghosts are spirits that symbolise the Dead. This doesn't necessarily make them Evil or completely safe from all forms of attack. Instead, it actually makes them more vulnerable.
Think of it in this way: People often warn others not to speak badly of the Dead. Why? This is because, it is believed that their souls get "restless", and this causes them to haunt others. Thus, Dark type moves, that symbolise the "evil" aspect of the Pokemon, are super-effective against Ghosts. Same goes with Psychic Pokemon, since they use their telekinetic powers a lot, they are more susceptible to mental attacks, that, if you observe, Dark Types specialise in (Think Taunt, and Sucker Punch, and Torment and so forth). That is why Dark Types impact other Pokemon in such a way.
There. That was the symbolic reason. Now for the more practical reasons:
In Generation 1, Ghost types were over-powered. So much that they had to make the Gengar family line Poison type just for the Psychic Alakazam family to touch them. The introduction of the Dark type in the 2nd generation gave GameFreak an opportunity to balance the strength of the Pokemon, which is most probably why Ghost Pokemon are weak to Dark type moves.