Ballistically they are fairly similar, with an edge going to 9mm in its +P and +P+ incarnations. But the .38 comes in revolvers, while the 9mm comes mainly in autos. So the question you are really asking is whether we prefer an auto or a revolver.
I strongly prefer autos for defense, and no longer even own any revolvers. However, revolvers are perfectly adequate for defense, and many very skilled shooters prefer them. .38 and 9mm have both been working fine for years, so long as good HP ammo is used.