There’s not really that much difference between them to be honest. It also depends a little on your budget and if you want front sifting as well. To summarise the most oft-quoted differences:
Sram mechs work better with add-on 40/42t cogs
Sram mechs allegedly wear out and go wobbly faster than shimano ones
Shimano shifting has a lighter feel (saint shifter aside) – some would say it feels smoother and more refined, others would say it lacks feedback and that sram shifting is much more positive.
Shimano front mechs are usually considered to be much better
Shimano offers better value at lower prices, deore and slx are better value than X5 and X7
(To declare my biases, I use shimano on all my bikes)