It can be all or any of the things the others mentioned.
Sunken belly in herbivores is a bit more dangerous than for omnis or carnis. Herbivores, its proposed, rely on gut flora to process food. In a starved condition, sunken belly, the gut flora dies off and the pleco can no longer process food. This is a condition typically seen in imported herbivore plecs. In omnis and carnis the digestive system is setup a bit differently so a starved, skinny plec can often recover. The severity of the sunken belly often makes a difference in the prognosis of the pleco.