Your planet is hungry after you harvested its resources, then you just tap "Upgrade" button that is under the planet to upgrade it. If the planet is producing the resources, you can't upgrade it.