Darth got it down. Dragons have incredible movepools, getting access to tons of moves to cover tons of pokemon. Ghosts have pretty good movepools, but after seeing them enough, they become very predictable.
Dragons have very high base stats, most of them hitting 600. I think Gengar and Chandelure have the highest base stats for non legendary ghosts, at 500 and 520 respectively. Even if dragon types aren't super effective against others, their powerful stats make up for it. Some of them, like Dragonite and Shelgon, can be fairly bulky. So even if you have super effective moves, you still might not be able to get a kill on them easily. Yache berry also helps dragons abuse their weakness. With their sheer power, it can make for a difficult kill, especially if they carry dragon dance. You gotta fight fire with fire, or dragon with dragon in this case.
Dragons only have 2 weaknesses: dragon and ice. Ghost types have Ghost and dark for weaknesses. Both of them are weak to themselves, but remember that most ghost pokemon are very frail. With pokemon like Tyranitar and Sharpedo running around, a single crunch can shut most of them out, even the defensive based ones. Dragons aren't just for beginners, they're overused for a reason.
Ghosts have more frailty and less sheer power than dragons. If you like ghosts, then by all means, use them. There's no "best" type. The overuse of dragons works to your advantage. Ice beam is a really popular move mainly because of dragons. Because everyone uses them, you know their weaknesses and can have a counter ready. If Ghosts were the dominant type, then everyone would carry dark/ghost moves and have counters for them, lowering their effectiveness.