Rapid and prolonged enrichment of uranium can lead to weapons-grade uranium
Enriching U-238 to create U-235 can aid in the creation of nuclear energy. However, enriching uranium can also lead to the creation of something much more dangerous—explosive, highly volatile weapons-grade uranium.
There are two main isotopes of uranium: U-235 and U-238. If a country starts to enrich uranium found in the ground—which is primarily U-238—it can create U-235. U-235 fissions, which means it can be used for nuclear power. However, if a country enriches U-238 rapidly or for prolonged periods of time, it can make enough U-235 to create a nuclear weapon.
Uranium in the ground is over 99 percent U-238, so enrichment is needed to get any useable amount of U-235. Ordinary nuclear reactors need about 5 percent of U-235 to work and create nuclear power, so a state only needs to enrich uranium a little bit to have it work in a nuclear reactor. However, if a state keeps enriching, it can get the uranium to about 80 percent U-235, which is enough U-235 to create explosive uranium that can be used in a nuclear bomb. 
If a nation starts to enrich uranium to create nuclear power, it can also enrich uranium to a point where it can create a nuclear bomb.