Some people like a heavier bullet, or a larger diameter bullet, or more muzzle energy. .40cal generally has 9mm beat for all those things.
Other people have a preference for things like capacity, reduced felt recoil, and a little less wear on the gun. Which is where the 9mm beats .40. (Cost is also in the 9's favor of course)
So do you want a few more rounds in the mag and slightly less recoil and wear, at a lower cost? Or do you want a bigger, heavier bullet, with more calculated muzzle energy?
Of the two, I prefer the .40, unless the 9mm is a .357 Sig.