Neddy is suppose to be the show's representation of a sibling with special needs - really, special needs. New things scare him horribly, and he gains comfort from suckling on the roots of the tree. I think what happened is during the expansion, or the sudden explosion in Candy Population, Bonnie asked Neddy if he could produce more sap.
Neddy, loving his Big Sister, began to suck at the tree and produce more sap. Of course, the tree has been used to this for hundreds of years, but as Bonnie gently asked Neddy to make more and more, he began to grow larger and larger, straining his candy body and the tree's ability to survive.
At some point it reaches critical mass, and the tree dies. Neddy must now try and feed an entire city's worth of Candy People with sap, and seeing as he's large, is able to do it. For a little while.
As Bonnie enlists everyone to try and revive the tree, Neddy grows weaker. Nothing else they give him can sustain him like the tree did. Over time he shrinks, the sap flow becoming smaller and smaller. The kingdom begins to rot from the outside as support for larger ventures dries up. The outer reaches, then the outer districts, the city's outer limits, until there's no sap left for anyone. Neddy is just too emaciated to give anymore and thus, he dies, giving all he can.