How do I know if a black banana is too old to be eaten?
One thing to add to the answers above - as bananas ripen, the starch in the flesh is converted into sugar. This continues until the starch that was providing the firmness and structure for the banana has, for the most part, been converted to sugar, which is also partly why the insides continue to get mushier as the banana ripens. So more time converting starch to sugar means sweeter fruit.

This is why black bananas are often preferred for breads and such - when the peel has turned black, the banana has converted almost all the starch to sugar and thus has gotten as sweet as it can before it spoils.

So for the sweetest possible banana bread/shakes/smoothies/etc, let the banana peel turn completely black, but harvest the banana before the insides turn to dark brown or black since that will indicate that the flesh has spoiled.