Good question. Depends on the story. In some Batman stories Batman is a sworn officer of the law.
Yep. But the vast majority of "superheroes" are unsanctioned vigilantes.
If you have the power to stop immoral acts or save lives at limited risk to yourself and don't do so, that says something about who you are as a person, but it's a long way from trying to stop every possible immoral act that you theoretically could.
And this brings us to another interesting topic that I wanted to talk about. Who decides what is an "immoral act"? In a democratic society, it is decided collectively. We elect our representatives, they enact the laws and the police enforce them. But a superhero independently decides that he is above all of that.
A person has above average abilities (resources, intelligence, superpowers etc). He decides that the best way to use these skills is to put on a costume and go beating on anyone who doesn't adhere to his personal concept of right or wrong (or save a few kittens from the trees). His personal motivations may vary, but the basic concept is always the same: he thinks that the structures that society entrusts to defend itself (police, firefighters, etc.) are unsuitable for this purpose. So he decides that he must defend his ideal of society, outside the rules and structures of society itself.
The Superhero thinks society is incapable, so he takes care of everything. To do what? Basically to keep the Status Quo.
Because, at the end of the day, (removing any supervillains from the scene) a world with superheroes is just identical to a world where law enforcement and firefighters are a little more efficient. Superheroes are reactionaries disguised as revolutionaries.
There is an ideology that perfectly represents the superhero belief (democracy is useless and therefore we need a Strong Man to solve problems, a Man who respects only the laws and rules that suit him). It's on the tip of my tongue...
In real life we know that it cannot be one man who decides what can be right or wrong. Because? Well, I think this video explains it perfectly.
If one really wanted to use his abilities to make a better world, he would become a policeman, a fireman, a politician. Heck, even a revolutionary if he thinks that society as it is cannot be saved. The most stupid thing would be to put on a costume to dispense the ihs concept of justice, because in the end it would be useless, indeed, it would also be harmful. Why try to improve the world we live in if there is already a guy in a costume who thinks of everything?