Nuclear Reactors: Production Reactors
Shortly after discovering the process of fission, it was realized that the huge amounts of energy it releases could be utilized in a weapon. During WW2, the US feared that Nazi Germany was developing such weapons and decided to create a nuclear weapon program itself.
Germany was defeated in May 1945. But the war waged on in the pacific theater and two nuclear weapons were dropped on Japan in August 1945, which lead to the surrender of Japan and the end of WW2.
Ever since, the specter of nuclear destruction has loomed in the public mind. The Soviet Union and the US engaged in an arms race during the cold war and created enough nuclear weapons to destroy the world multiple times over. The designs steadily improved. Newer designs use fission reactions only to start a fusion reaction. The yield of the largest weapons has grown to 1000 times larger than the weapons used against Japan. What hasn’t changed, though, is that these weapons depend on fissile material.
In the public mind, the military use of nuclear technology and the civil use of military technology have often been conflated. In both domains, reactors, enrichment, reprocessing, uranium and plutonium are relevant terms.
Stockpiles
Currently there are 9 states assumed to have nuclear weapons. The exact extend of their arsenals in not always public information. Probable estimates of their arsenals are given in the table below. Historically, 4 other states had excess to nuclear weapons. After the break-up of the Soviet Union, Belarus, Ukraine and Kazakhstan ended up in control of huge numbers of nuclear weapons. They transferred these weapons to Russia.
South Africa had developed nuclear weapons, but dismantled all of them (6) in 1991.
Technically, some NATO states (Belgium, Germany, Netherlands, Italy, Turkey) are also in the possession of nuclear weapons. They still belong to the the US and need to be activated by the DoD to work, but they would be delivered by the armed forces of the NATO allies.
While there are in theory several isotopes that could be used to build nuclear weapons, all known weapons are using either highly enriched uranium-235 or plutonium-239.
Fusion-boosted and staged thermonuclear weapons are also heavily reliant on Li-6 and H-3 to work.
The amount of fissile material is monitored and current stock piles in tonnes can be seen in the following table:
The amount of fissile mal needed for nuclear device varies and depends on the design and isotope. Little Boy contained 64kg of HEU for a yield of 15kt, Fat Man only 6.4kg of Pu for a yield of 21kt.
Uranium-enrichment
There are multiple processes to enrich uranium. While gaseous diffusion plants were used in the early weapons programs and later on commercially, today, centrifuges are the dominant tool to enrich uranium. They rely on weight differences between the uranium-235-and uranium-238-hexafluoride. The separation process is boosted by heating one side of the centrifuge to create a thermal difference.
There is some research on separation techniques that use lasers to selectively excite one isotope. But it does not appear to be a commercial competitor to the centrifuge technology at the moment. Which doesn’t mean that this process could not be used in a non-commercial, military setting.
A plant to produce enough HEU for a bomb per year would not use more energy than a supermarket and can fit in small complexes. It is hard to detect them remotely.
A determined state actor can hardly be stopped from taking this route.
Pakistan got its first nuclear weapons via uranium enrichment and it is suspected that North Korea and Libya were offered access to these technologies. South Africa also acquired its nuclear weapons by enriching uranium, albeit by a aerodynamic process using specialized nozzles.
Militarily, uranium is not as desirable as plutonium, because the latter can be more easily miniaturized and used for missiles.
Plutonium
Just as uranium, plutonium has different isotopes as well. Plutonium-239 is bred from uranium-238. This happens to a certain degree in all reactors using uranium, including commercial reactors. But, plutonium-239 can also absorb neutrons an become plutonium-240. A percentage of plutonium-239 above 93% is considered to be weapons grade. Everything below it is more complex to make into weapons. There has only been one published test of “non-weapons-reactors” plutonium in a nuclear weapon. It worked, but poorly enough to dissuade state actors from going this route to access nuclear weapons.
The ratio of plutonium-239 is determined by the burnup of the fuel. Here is an example of it from an early US production reactor:

Commercial reactors are geared towards a high availability and burnup. Shutting a reactor down regularly to extract fuel prevents a profitable operation. The following figure shows representative burnups and isotope compositions of plutonium. It can be seen that the isotopic composition of commercial reactors (PWR, Heavy Water (CANDU, PHWR)) is not suitable for military purposes.

States in pursuit of nuclear weapons soon realized that specialized nuclear reactors were the only practical route to go for the acquisition of sufficiently pure plutonium-239.
There are least three distinct types of reactors have been used for plutonium production.
Graphite-moderated, water-cooled

Almost all of Russia’s plutonium was produced in graphite-moderated, light-water cooled reactors like the one depicted above. In total, the Soviet Union built fourteen of these graphite-moderated water cooled production reactors at three sites in Russia: six at the Mayak Production Association in Ozersk in the Urals; five at the Siberian Chemical Combine in Seversk near Tomsk; and three at the Mining and Chemical Combine in Zheleznogorsk near Krasnoyarsk. These reactors had thermal power ratings of up to 1200 MWth and produced 270kg of plutonium per year. [Source]
In the USA, the Hanford site hosted 9 graphite-moderated, light-water cooled reactors. Their fuel and coolant channels were horizontally oriented. 8 had single-pass cooling systems, the ninth had a recirculating primary coolant system and operated at higher pressures and temperatures. The capacity of the reactor systems can be seen in the following table:
China also used such reactors for their plutonium production. The Jiuquan plutonium production reactor, designed with assistance from the Soviet Union, was initially rated at a capacity of 250 MWth; the power and performance of the reactor were increased significantly later on. [Source] Little is known about China’s largest plutonium production reactor at the Guangyuan complex. It’s assumed to have been of similar design but larger. [Source]
This type of reactor has become infamous by the Chernobyl accident. The RBMK was a dual use reactor with online refueling capabilities and came with an undesirable positive void-coefficient. It appears that despite its design these reactors have never been used to retrieve weapons-grade plutonium.
Heavy-water moderated
An alternative route to creating weapons grade plutonium is the utilization of heavy-water moderated reactors. Just as the graphite-moderated, light-water cooled reactors, they are designed to easily retrieve the plutonium. Schematically a heavy water production reactor looks like this:

The USA operated 5 such reactors at Savannah River, named R,P,K,L and C. Their thermal capacity was initially below 500 MWth, but approximately 2500 MWth after their refurbishments. [Source]
All reactors have been shutdown. The K-reactor is kept as a standby source of tritium. This is what it looks like:

The Soviet Union operated 4 heavy water production reactors at Mayak, ranging from 100 to 800 MWth. [Source] But they were soon converted for the production of other isotopes.
India produced its first nuclear material in a research reactor called CIRUS. It had a capacitiy of 40MWth. India operates a 100MWth reactor called Dhruva. The Bhabha Atomic Reserch Centre near Mumbai is the home of both reactors.
Pakistan operates four heavy water production reactors in Kushab. They have a capacity of 40-50MWth and are each estimated to be able to produce 11-15kg of plutonium per year. There have been reports of plans for a new, fifth reactor at the site with a capacity of up to 1000MWth.
Likewise Israel is suspected to operate such a reactor at Dimona for its (unoffical) nuclear weapons program. The initial power is suspected to have been 26 MWth, scaled up to about 70MWth and probably more than 150MWth after refurbishments. [Source]
Graphite-moderated, gas-cooled
Most of the UK military plutonium was produced at the Sellafield complex in a total of six production reactors: the two Windscale Piles and the four Calder Hall reactors. Also all reprocessing operations took place there. The Windscale Piles were cooled by air and shut down after a graphite fire in 1957. The Calder Hall reactors were of the Magnox-type. The fuel is clad in a magnesium alloy, moderated by graphite and cooled by CO2. Calder Hall reactors had a capacity of approximately 265 MWth after an uprating from their initial 180 MWth. The UK operated four similar Magnox reactors at Chapelcross, whose fuel was also sent to Sellafield for reprocessing. A schematic of this reactor can be seen below.

France developed its own line of production reactors called UNGG. They had a different magnesium alloy for their fuel cladding and were moderated by graphite. These reactors featured horizontal fuel channels, as can be seen in the photo below. Three dedicated plutonium production reactors were built at Marcoule. The first reactor, G1 had a thermal capacity of 46MWth and was air-cooled, while G2 and G3 had capacities of 250 MWth and were cooled by CO2.

North Korea is also operating a 5 MWe Magnox type reactor for plutonium production at Yongbyon. There were plans to construct a 50 and even a 200 MWe version of this reactor type. The status of these reactors seems unclear. A a rule of thumb, this type of reactor produces 0.9g of plutonium per MWth per day.
Summary
The commercial and military nuclear sector work with a lot of similar materials. But the isotopic composition is different and renders commercial material almost worthless for weapons purposes. The reactor designs and especially operation modes used in commercial applications are unsuitable for military purposes.
Commercial reactors are monitored by international agreements. The enrichment process takes place at monitored facilities and all spent fuel is monitored and accounted for. There are proposals to create an international fuel bank that guarantees access to LEU for all countries that are part of the Non-Proliferation Treaty. This bank would also take back SNF and reprocess it. This international agreement would weaken the argument for the need for enrichment and/or reprocessing facilities in certain countries, while simultaneously granting them access to commercial nuclear power and possibly even closing the fuel cycle.
Short of military interventions, a determined state actor cannot be prevented from acquiring the necessary materials for creating material for nuclear weapons, as the examples of North Korea and Pakistan show.
On the other hand, a lot of states that are and have been capable of producing weapons materials, like Japan, South Korea or Germany, choose not to do so. The mere ability to build nuclear weapons is not sufficient to do so.
Restricting access to a carbon-free, firm electricity source does not seem to be the best way of preventing nuclear proliferation. Actually, it doesn’t seem like it is working at all in that regard, while it simultaneously forces certain countries to opt for fossil power plants, primarily coal. I think it is time to reevaluate this approach.
An international fuel bank, like Daniel Poneman proposes under the name of “Assured Nuclear Fuel Service Initiative”, might be far superior in achieving the goals of non-proliferation efforts.