Energy of a fission nuclear bomb comes from the gravitational energy of the stars.
Protons and neutrons can coalesce into different kinds of bound states. We call these states atomic nuclei. The ones with the same number of protons are called isotopes, the ones with different number are nuclei of atoms of different kinds.
There are many possible different stable states (that is, stable nuclei), with different number of nucleons and different binding energies. However there are also some general tendencies for the specific binding energy per one nucleon (proton or neutron) in the nuclei. States of simple nuclei (like hidrogen or helium) have the lowest specific nucleon binding energy amongst all elements, but the higher is the atomic number, the higher the specific energy gets. However, for the very heavy nuclei the specific binding energy starts to drop again.
Here is a graph that sums it up:
http://en.wikipedia.org/wiki/File:Binding_energy_curve_-_common_isotopes.svg
It means that when nucleons are in the medium-atomic number nuclei, they have the highest possible binding energy. When they sit in very light elements (hidrogen) or very heavy ones (uranium), they have weaker binding. Thus, one can say that for the low "every-day" temperatures, the very heavy elements (like the very light ones) are quasistable in a sense.
Fission bomb effectively "lets" the very heavy atomic nuclei (plutonium, or uranium) to resettle to the atoms with lower number of nucleons, that is, with higher bound energies. The released binding energy difference makes the notorious effect. In terms of the graph cited above, it corresponds to nucleons moving from the right end closer to the peak.
Yet this is not the only way to let nucleons switch to the higher binding energy state than the initial one. We can "resettle" very light elements (like hydrogen) and let nucleons move to the peak from the left. That would be fusion.
Heavy nucleons emerge in the stars. Here the gravitational energy is high enough to let the nucleons "unite" into whatever nuclei they like. Stars usually are formed from the very light elements and the nucleons inside, again, tend to get to the states with lower energies, and form more "medium-number" nuclei. The energy difference powers stars and we see the light emission, high temperatures and all other fun effects.
However, sometimes the temperatures in the stars are so high, that nucleons form the very heavy nuclei from the medium-number nuclei. even though there is no immediate "energy" benefit.
These heavy elements then disseminate everywhere with the death of the star. This stored star energy can then be released in the fission bomb.
There's a closely related question: binding energy of a nucleus is positive?
Imagine taking the nucleus and pulling it apart into individual protons and neutrons. To do this you have to put in energy, and the amount of energy you put in is equal to the binding energy - call this $E_0$. Now let the individual protons and neutrons come together again to form the daughter nuclei (and free neutrons). As the question I linked explains, to form the daughter nuclei you have to take energy out, and the amount of energy you take out is the sum of the binding energies of the two daughter nuclei - call these $E_1$ and $E_2$.
When you say the binding energy of the products is higher what this means is:
$$ E_0 < E_1 + E_2 $$
So in our notional process of pulling the nucleus apart and letting it reform, we end up getting energy out i.e. the fission process produces energy (typically as kinetic energy of the reaction products).
As for the masses, when we separated the original nucleus we had to add an energy $E_0$, so the mass of the separated nucleons is more than the original nucleus by an amount $E_0/c^2$. When we let the nucleons recombine into the daughter nuclei we get energy out so the mass of the products is less than the separated nucleons by an amount $(E_1 + E_2)/c^2$. Because $E_1 + E_2 > E_0$ overall the mass has decreased giving us the mass deficit. The mass deficit is just the amount of energy released in fission divided by $c^2$.
Best Answer
The type of fissile material and geometry( the arrangement in space).
The energy available comes from nuclear transitions and is fixed for a specific interaction and isotope combination. It is proportional to the number of nucleons available, and thus to the total mass.
No. It can be estimated after the fact. That is why there are always trials of all new weapons.
Logarithmic scatterplot comparing the yield (in kilotons) and weight (in kilograms) of various nuclear weapons developed by the United States.
The power will depend on the geometry i.e. the arrangement in space of the fissile material. The energy released can be estimated after the fact, as is shown in this wiki article, although there are theoretical maximum yields that can be estimated.
This question can really be satisfied by taking a nuclear engineering course, not by asking questions here, imo.