All of Starfy's form upgrades are tucked away in the secret levels rather than handed out during the main story. Beat the standard stages, then go back and hunt down the hidden stages you skipped along the way.
Each secret level holds one of the upgrades, so clearing them one by one is the reliable route to a fully powered Starfy in every form. Expect to replay a few stages to meet whatever conditions the hidden level demands before it opens up.
Work through them in order and you will end up with the complete set, which makes the tougher late-game stages considerably more forgiving.