As I'm relatively new to the forum I'll post a reply, but if you search the threads this is covered often and usually opens a can of worms.
.40 - more capacity while making a slight concession in stopping power
.45 - slightly more stopping power while making a concession in capacity
.40 is typically available in slightly smaller (9mm size) platforms than the .45, but that increases felt recoil we will talk about below and usually degrades accuracy and follow-up shots.
I have both calibers in a few platforms. The .40 is more snappy and honestly for a newer person is more difficult to control. The .45 is a bit slower recoil like a "push" vs. the .40's "explosion". I have had to deploy both in the line of duty and the .45 does have more intimidation factor IMHO (but don't count on that for anything).
Ammunition for the .40 is a little cheaper than the .45, both are readily available.
If for some reason you are restricted to FMJ Ball type ammo, go with the .45, today's "super bullets" considerably shrink any performance gap between the two.
In short, find which one you shoot well because everything else will be pretty negligible in performance.
When it comes to any handgun load there honestly won't be a huge difference if you should unfortunately ever have to use it. If everything goes wrong and you have to deploy your weapon, you won't shoot someone with a .40 and have them say "well thank god it wasn't a .45".