The green bars represent how far you are into being ready to upgrade your units or commanders.
The bar represents how many unit cards you own for that particular unit or ability. As you level up those units, the number of cards you need to upgrade additional levels will gradually increase.
The bar represents how many of the pre-requisites for upgrading the commander to the next level that you've met . These pre-requisites usually involve acquiring a unit or ability card and leveling it up to a certain level. Tap on the commander in the upgrade section to see what the requirements are.