Can you tell how ripe a banana is by the actual fruit not the peel?
Ripe bananas are softer and sweeter. You can pretty easily tell how ripe a banana is simply by biting or cutting into it, or even poking it with a finger. Ripe bananas are also more prone to bruising, which is visible on the inside of the banana as well.

If you really want to try to measure, you could indeed try to measure the sugar content. As bananas ripen, they get sweeter because starch is converted into sugar, so the sugar content should indicate ripeness. You'd need a refractometer to do that, not generally an everyday household item.