The reason nuclear weapons are under DOE instead of DOD is that we probably wouldn't have them if DOD had been left to develop them. The security cultures of the organizations are very different. DOE operates under an open culture where the smart folks are allowed to see most all of the information except for select areas which are very compartmentalized. The DOD works by trying to keep everything on a need to know basis resulting in mass duplication of effort and the people capable of solving a problem typically not being allowed to do so.
The scientists on the Manhattan project largely prevented the paranoid security culture from slowing their work during the second world war. Once the bomb was developed and the affair no longer results-oriented, General Leslie Groves pulled Robert Oppenheimer's security clearance because Military culture was incapable of handling someone whose ideology did not fit with their own. Why they never pulled Edward Teller's clearance is a mystery but I suspect it is because Teller was still needed in H-bomb development. Even in his later years, Teller, in a speech he gave to a group I was in, said that the security rules at DOE were a bunch of bunk. Some old DOE hands at the speech said this was one of the first time they heard Teller mutter at the end that the security rules also must be followed (around 1992).
DOE has some great programs but now that it has been run by defense contractors for the most part rather than University of California, for the last 5 or 10 years, DOE is a much poorer place and bound to be plagued by the same inefficiencies that DOD is. A large group of scientists openly sharing information in what was definitely a collegial setting in the late 1990's is almost certainly being replaced by DOD type folks with a bunker mentality.
For me, the DOE should probably should remain doing energy research and the weapons function could be transferred to DOD. Unfortunately, most of the technical capabilities in the national labs are based on having gold plated everything and top rate people trained to produce and analyze anything, especially the odd kinds of things encountered designing nuclear weapons. Budgets are such that most of these facilities probably could not be maintained for peaceful work if all of the equipment, supplies and technicians weren't being paid for from a bottomless defense budget. If all the nuclear weapon budget at DOD went away, there is a good chance that the useful civilian science would also stop unless a large amount of funding was added to civilian science programs to make up for the lost support of the first rate infrastructure.
A morsel of genuine history is a thing so rare as to be always valuable. -- Thomas Jefferson