Should I replace the door hinge or add a new pin?
If you can find the same style of hinges it may just be the easiest to replace the hinges with new ones. For the smaller bi-fold door hinges it is unlikely that you can find replacement parts and new hinges are not all that expensive. 

The most likely reason the one hinge pin is loose is because the hinge itself has deformed and not due to wear of the pin itself. Once again suggesting replacement.

You may find that replacement hinges have the screw holes in different locations than the originals. This would not normally be a problem because you can easily drill new pilot holes for the screws at the new locations. However sometimes a new hole will be right next to one of the old holes. If this happens it is recommended to fill the old hole with a glued in plug carved to the right size from a piece of scrap pine board (some folks like to stuff the hole up with glue and toothpicks). Pound the plug in place and let dry overnight and then cut off flush with a sharp chisel.