Well, the answer to this puzzle has to to with the structure of nuclei. (This was an obvious statement, wasn't it?). To see this, let us consider some properties of nuclei. For definiteness, we'll look at helium.
In a sense, the purpose of neutrons in a nucleus are to act as electrical buffers between the protons which serves to weaken the electrical repulsion between the protons!
Based on the above, we note that certain nuclei may be more tightly bound together than other nuclei. That is, some nuclei will require less energy to hold themselves together than other nuclei depending upon the make-up of the nuclei. For example, suppose you fuse A and B to make C. If C is easier to hold together than A and B, energy will be released in the process. If C is harder to hold together than A and B, then the fusion requires an inpur of energy to happen.
For the latter case, if you reverse the process and think of taking C and breaking it into A and B, energy woudl be released!
It turns out that fusion yields energy for low mass elements while fission releases energy for high mass elements. The break between the two regimes falls at the element iron (Fe) (26 protons in its nucleus). Note that this says that stars can only generate energy via fusion up to elements as massive as iron.