most likely its becuase the puffer you have (dwarf puffer i am guessing only freshwater puffer) is not able to be in your tank, the tank you have must be completely cycled and have perfect settings, a slight setting can lead to harm and death to a dwarf puffer, plus these things are aggressive so you must only have a tank just for puffers, and they require 5 gallons each .... you must also only feed them live food, (blood worms and snails is the best diet, they must have snails in their diet)
those are the most likely reasons your puffer died, mine also did the same thing, i had to put him out of his misery, either it was a parasite, or the tank ratings were off a bit....
so make sure
-you dont feed him flake foods, or pellets (it is extremely rare they will eat these)
-keep them in their own tank
-5 gallons per puffer
-tank cycled completely
-and no other fish!
hope this helps and im sorry to hear your loss