The two have different pros and cons, so it's not bad to learn both and have them in your arsenal.
Q is fire and forget. You keep moving the same as before you fired, you just hope the enemy is close enough for it to hit them right away or it doesn't bounce over them.
Q is more deliberate. You slow down as you build up the range, which can make you vulnerable to a counter attack while prepping (or a silence stopping the attack), but it goes further and travels instantly. Doing all of the damage at the same time means it's not a projectile, so it can't be stopped by
or 
W can be fantastic for safety, thanks to its ability to knock himself away or enemies away, or both in a pinch. That makes him safer against threats that want to close the gap on you. It's execute on towers also makes him the best mage for taking towers, bar none. However it can send targets the wrong way if you're not careful, and it sucks when you think it'll finish someone off but it just pushes them to safety.
E is his hard CC ability, but it has a distinct weakness against in-your-face champions. It is only 0.25 seconds at close range, which means once someone gets to Xerath he's in a world of trouble. However, it's slightly better for getting a catch on a target than Ziggs hard CC, since they won't shift around and it lasts longer at further ranges.
E is his zoning tool. He can make enemies really not want to walk in a certain area, but it's less common to see it used offensively. The arming time of the mines seems to take a while too.
W is his AoE Slow. Landing it dead center on a target can slow them 80% (compared to the 40% of Ziggs's mines), but it's less useful at zone denial and more useful for instant damage or retreating. Also can't be stopped by
or 
ult is an AoE bomb has increased travel time based on the range, so if you're too far away it's entirely likely you'll miss your target. Much like his Q though, it's fire and forget, so you can throw it on yourself should some pesky assassin be trying to end you and keep running away/firing back at them.
can snipe targets from half way across the map. The more I've used this ultimate the more I've realize how much utility it has. You can participate in teamfights that you were too far away to contribute to otherwise with accuracy, you can snipe fleeing targets, you can peel for fleeing allies by forcing enemies to decide if they actually want to take 5 ult shots getting a kill, you can use it to try and secure objectives, firing at the enemy team taking it to get vision before trying for the killing blow, etc.
If you're just looking for a steady stream of poke, a little bit more safety against assassins, and some tower threat, then Ziggs is your man.
If you're looking to stop fights before they get started, or to make sure your team finishes a fight, then Xerath is your man.