The binding energy of a nucleus is the difference between the sum of the rest mass energies of each of its nucleons and the rest mass energy of the nucleus.
The energy (and equivalent rest mass according to E=mc2) of a bound system is less than the sum of its individual components, and the nucleus is nothing but a bound system of neutrons and protons! This simply means that you would have to put in some work (and corresponding energy) to separate the components of a system. Another way to look at it is that when the components of the nucleus are inside the nucleus they have more stability than as separate entities, making the nucleus a stable particle.
You can also think of it this way; the strong nuclear force being attractive in nature means that the closer you bring the nucleons, lesser will the energy associated with the system be! So, the difference in the sum of the energies of the nucleons (when they are isolated, infinitely far from each other) and that of the nucleus is the binding energy.