Uranium is a natural substance mined from the earth. During the late 1930s, German physicists discovered that, under the right conditions, it possessed the properties required to build explosive devices that went beyond any conventional – or non-fissionable – explosive. As this information spread to scientific communities in other countries, and with a major war developing across Europe and Asia, governments in Britain, Japan, the United States, and the Soviet Union began programs to develop this new type of bomb – what would come to be known as atomic bombs.
An atomic or nuclear weapon is a complicated and time consuming item to design and build. In order to achieve the kind of explosive power scientists sought, the explosive materials, particularly the core of the bomb, needed to be constructed to extremely precise specifications. As theories of nuclear fission and, later, nuclear fusion were developed, it was determined that, at precisely the right quantity, uranium processed to a certain state would undergo a reaction that would result in an explosion the likes of which nobody in human history had ever witnessed or, for most of mankind, ever envisioned. Basically, at just the right quantity of uranium, nuclei split and release enormous amounts of energy. Attaining just the right amount of properly processed uranium – known as Uranium-235, U-235 – is difficult because not every country has its own uranium deposits and because the process of refining raw uranium into weapons-grade uranium requires extremely high-technology centrifuges, which spin in such a rate, and at such a quantity, that the uranium isotopes separate and “purify” the uranium, with the final product being U-235.
So, highly-processed uranium constitutes the core of most nuclear weapons. It is the radioactive material that provides the basis for the weapon. More advanced countries, like the United States, Russia, Britain, France, and China have “graduated” to even more explosive thermonuclear weapons, which utilize a fusion process rather than the fission process used in older generation nuclear weapons. Pakistan, which possess many nuclear weapons already, is suspected of seeking the ability to develop thermonuclear weapons, and its arch rival, India, is thought to be very close to having that capability if it doesn’t already. [Israel is universally believed to have more than 200 nuclear weapons. Whether any of those are thermonuclear, also known as hydrogen bombs, is unknown.]
While uranium-235, which, as mentioned, is processed through multiple series of centrifuges, called cascades, plutonium, a product of the chain reactions created in nuclear power plants, is also used as the core of nuclear weapons. The answer to the question, though, is that uranium provides the chemical basis for the core of the nuclear weapon.
Uranium is a radioactive element. It before it was discovered for its nuclear purpose, it was useless. The reason why uranium is so important in producing nuclear weapons because it undergoes nuclear fisson (Nuclear fission is the process in which the nuclei of large atoms break apart). This is what makes the atomic bomb explode, and at such great power. These resources I linked have more information about uranium and it's purposes and role in the production of nuclear weapons.