France always was a leading power in nuclear research (cf. work from the Curie family, etc), and its pre-war research and scientists helped the Manhattan project (they were transfered to the UK after the capitulation of the country, including the heavy-water supply).
After the war, researched started again with the Commissariat à l'Energie Atomique (CEA: Nuclear Energy Commissariat) being created on the 18th of october 1945.
If the production of the atomic bomb was always implied, it wasn't a priority until the Suez Crisis in 1956. The first bomb was detonated on the 13th of February 1960 (see opération Gerboise bleue) in the Sahara Desert.
The first post war cell (the word being "pile" in french, that was used at the beginning of nuclear reactors, see u/yes_mr_bevilacqua comment bellow) is decided in 1947, and enter into service in 1948.
In 1952, the first nuclear plan was approved by the National Assembly. Three cells are constructed, they do not need enriched uranium (at the time only available in the US), and use a technology called UNGG (meaning Natural Uranium, Graphit and Gas) that the national industry is able to provide. They can produce plutonium for military use, or for a planed surgenerator.
From the beginning, EDF (the national company responsible for electricity production) proposed to use the energy produced by those reactors to produce electricity. An aggreement between the CEA and EDF is concluded in 1954: the Commissariat will design the nuclear installations, and EDF will be project manager and operator of those installations.
In the 1960s, 6 reactors using the UNGG technology are constructed, their power progressively increased from 70 to 540 MW. EDF was also interested by the pressurised water reactors (REP in french), a first central was built in Chooz, near the Belgian border in collaboration with the Belgian electricity producers. This central design by Westinghouse a US company, and built under licence by Framatome, it entered service in 1967.
The UNGG technology was at the end of 1969 in favour of pressurised water reactors, especially due to their superior economic competitiveness regarding the price per kWh, their reliability (the US nuclear parc had multiple of REP already in service), and the difficulties encountered to make more powerfull UNGG reactors. France was also mastering the uranium enrichment technics, which enable the use of other technologies.
Before going into the 1973 oil crisis, which was the determining event. The previous expose aim to show that before this event, electricity production was already being seen as one of the advantages of nuclear, even if it was sometimes a secondary product. The second important aspect to realise was the developement of national capacities, and the will to not rely on foreign designs or supplies (especially for enriched uranium).
With the Kippour War in 1973, the oil barrel was multiplied by 4. The electricity at the time being produced by 13 000 MW of thermic energy, and it's not even counting domestic heating (later household were incitated to switch to electric heating).
On the 6th of March 1974, the Prime Minister Pierre Messmer launched the construction of 13 nuclear reactors of 1000 MW each.
Between 1980 and 2002, 52 reactors are put into service, 75% of them in less than 10 years. Multiple reasons explain this success: a strong political will, economy of scale and experience of building continuously for many years, and usage of a proven technology.
Adding to that the cheap price of uranium, the low quantities required (compared to oil) and the supplies sources that were in France, or in countries in its zone of influence.
Nowadays, the proportion of nuclear is declining a bit because no now reactors have being built since 2002 to replace the older ones that are starting to be decomissionned. Flamanville is the symptome of that : because they stop conceiving reactors, the old generation of engineers couldn't really passed all their knowhow to the young ones, same goes with all the other professions, especially welders. And because only a few were built, there was no economy of scales. Due to the delays, some equipements had to be replaced (at a great cost) because it degreated after years of not being used.
This highlight the reasons of the success of the french nuclear program : political will, independance, and economy of scale (oh and a big upfront cheque by the State to a national company, which is harder nowadays).
I hope I was able to answer your question.
Source: C. Lewandowski, Le Nucléaire, Que sais-je?, 2021
P.S.: all of the acronyms are in french
Edit : correction about the use of the term « pile » instead of reactor follow a comment under this one.