Assuming you don't miss.
A firearm is a much safer tool for personal self-defense, especially home-defense.
Knives are highly dangerous to their (usually untrained) users, bats have the same issue: you're getting too close to the threat. Also, these mechanisms of self-defense are widely seen as heinous. If you stab someone, bash their head, even in self-defense: that's a heinous and inhumane way to defend yourself.
Tasers have the limitation of a slow-moving (harder-to-aim) projectile that may-or-may not penetrate clothing (it certainly won't penetrate heavier leather, etc.).
Assuming you don't miss (in which case you're not going to be able to fire again with the civilian-oriented tasers), you are praying that it's enough to actually stop the threat.
What if there is more than one assailant?
Also, Using a bat is more heinous than a gun? What society are you from? Someone can be subdued but not killed with a bat, but a gun puts them down for good.
I would rather stop the threat cleanly with a firearm. I'd also rather subject myself, my family to far less physical risk by not thinking I can macho it out with a baseball bat. Brain damage, broken limbs, missing teeth caused by a baseball bat are widely viewed as inhumane, regardless of the situation - self defense included.
> I don't see them being necessary for most people in a modern society.
You should share that view with the next police officer you see carrying a firearm. In the US, any will do.
> What society are you from?
I'm from the United States of America. US courts, even in the most self-defense averse areas tend to agree with this view.