I assume that we are talking about real (full-auto) MP5s and UMPs and not semi-auto clones. I have shot both, here is my list:
MP5 Pros
1) More controllable than the UMP on full-auto.
2) The MP5's roller-locked action provides for smoother shooting than the UMP.
3) Parts are more easily available, from a wide variety of sources.
4) A much longer track record of performance and reliability.
UMP Pros
1) Cheaper than the MP5 for those who can actually buy one (LE/military).
2) Barrel is user-swappable. In contrast, the MP5 barrel requires a hydraulic press to swap out.
3) Caliber-converable between 9mm, 40 and 45 by switching barrel, bolt and mags (and ejector for 9mm).
4) While parts are more difficult to obtain, they seem to be less expensive.
MP5 Cons (vs. UMP)
1) Not caliber switchable. 40 and 10mm versions no longer available new, and parts are more scarce. No .45 versions made.
2) Barrel not user-swappable.
UMP Cons (vs. MP5)
1) Rougher to shoot due to the heavy bolt.
2) Not as easy to control in full-auto. It tends to walk up and to the right.
3) Some reports of the plastic receiver melting in sustained full-auto usage. I cannot verify this personally.
If I could own only one, it would be the MP5 in 9mm. As much as I love the 40 S&W round, it is too difficult to find MP5/40 parts these days. Of course if you are able to own one of these, you likely have an armorer that can maintain it and find parts for you.
Having said all of that, I do own semi-auto "clone" versions of both guns and I wouldn't give either one of them up!
Thanks,
James