This answer is going to be long and rambly because I'm writing it on my phone and I just wanted to throw all the thoughts I had out there. Maybe it should be edited later though to make it easier to read and/or to add sources for claims. Also, I may stray a bit away from your specifications for the planet at times.
First of all, O2 is a high energy molecule that can only be present in the Earth's atmosphere because it is created by life. Life is kind of like the opposite of chemical equilibrium and often pumps systems away from chemical equilibrium when it stores energy in itself by methods like photosynthesis. If a planet has an F2 rich atmosphere, it's probably biogenic, because otherwise it would have to just have so much fluorine that it ran out of things to react to (which is really weird) or it would have to be at extreme temperature-pressure condition where that was part of the equilibrium (?really high temperatures or low pressures, but not enough for atomic F), or there is some non-biogenic process pumping this disequilibribrium, like ultrahot volcanic eruptions, lightning, or radiation* breaking things up.
*EDIT: Daniel Joyce made a good point by mentioning radiation. Neutron star planets are definitely a real thing, and even include the first confirmed exoplanets. I have no idea how likely it is for a planet to be close enough to a neutron star to be heated to Earth-like temperatures, but any star heated my neutron-star-light would be heated mostly by x-rays and very hard UV. These are energetic enough to break up and ionize pretty much anything, so the chemical composition of the surface and atmosphere of such a planet would be very different from normal "chemical equilibrium" that's based on just pressure, temperature, and composition, even without life. If such a planet's surface was rich in fluorine, then atomic F, F2, and many other bizarre things, including ions (i.e. the atmosphere might be plasma even at rather low temperatures), could be major parts of the atmosphere. These x-rays would also lead to ridiculous rates of atmospheric loss, too, perhaps removing all volatiles (substances likely to become gases) from the planet on astronomically short timescales which may or may not be good for your idea. Ways to get more moderate, but still large, amounts of x-rays are with tiny flare stars like Proxima Centauri, other rarer types of flare stars like some RS Canum Venaticorum variables (close binaries), stars that are just massive and hot, and so bluer, and parasitic binaries (x-ray binaries). An black hole/neutron star/white dwarf accretion disc outside of a parasitic binary would be very x-ray or even gamma-ray heavy, but would probably be short lived.
Personally, I think the idea that a life-form might release F2 into the atmosphere is quite plausible, but only if fluorine is particularly common in it's environment in some other form. Thus, large parts of your planet need to be rich in both fluorine (probably fluorides of some kind), and energy that is accessible to autotrophs (likely sunlight, but not necessarily). The key issue is getting enough fluorine on the surface, in any form.
There are probably astrophysical processes that could produce particularly fluorine-rich parts of the universe, but I don't know how fluorine rich. Fluorine has only one stable isotope: Fluorine-19. F-19 is generally easily destroyed in environments where fusion can occur and it is not directly produced by the alpha-process, (which makes the even numbered elements from carbon to nickel). F-19 is produced in a couple variants of the CNO cycle that are somewhat important in heating large stars (CNO-III and HCNO-III), but it is quickly and easily destroyed by the following fusion reactions in those cycles. Apparently the fact that there is as much fluorine as there is is a bit of a mystery, so that leaves hope that there might be some process that isn't well studied that's very good at making it. Also, I really don't know at all, but maybe some kind of neutron- or proton- capturing process that either happened really quickly and the stopped or happened in a low energy environment might make a slightly more favorable amount of fluorine. Look up the s-process, p-process, r-process, and rp-process to see if any work. I know special astrophysical environments can make some extremely strange balances of isotopes, like how the r-process of simulated neutron-star mergers makes more noble metals, elements around caesium, and lanthanides than anything else and a weird balance of the lighter elements.
EDIT: For probably much more accurate and useful information about fluorine and it's mysterious creation, see Origin and Occurrence of Fluorine, and it's two sources, Fluorine: An Element-ary Mystery and On the origin of fluorine in the Milky Way, as well as The thermonuclear production of 19F by Wolf-Rayet stars revisited, The origin of fluorine: abundances in AGB carbon stars revisited, and FLUORINE IN THE SOLAR NEIGHBORHOOD: NO EVIDENCE FOR THE NEUTRINO PROCESS.
I doubt astrophysics will solve all your problems, but it could be a good first step.
My first guess as to what the most important factor in getting a fluorine-rich environment would be is that some chemical process is concentrating fluorine near the surface, pulling it out of the mantle. I believe that fluorine is slightly enriched in the Earth's crust, but there is still a lot more of it in the mantle that we could take out. In fact, the increase in the amount of fluorides in water is one of the major threats of volcanic eruptions, and HF and SiF4 are notable components of volcanic gasses.
It's also important to just remember that planets have way more mass in there interior than near their surface. I've heard that even gold could completely cover the surface of the Earth as a thin layer of coins if you took all of it out of the Earth's interior. Enrichment based on chemical and physical properties already do wonders towards making rare elements common in some environments. Consider how silicon is the 2nd most common element in rocky planets while helium barely present at all, how the Earth's oceans have so much chlorine (as chloride) in them because it concentrates on the surface and in water rather than in the mantle, how the Earth's atmosphere is mostly nitrogen because close to half of all the Earth's nitrogen is in the atmosphere while most of the oxygen, carbon, hydrogen, and sulfur are in in the crust, mantle, core, and oceans, or how ore deposits and crystals of rare elements like HgS deposits can form.
I'm not sure what could preferentially enrich fluorine so much to the exclusion of other elements. Fluorine is usually found as HF in the interstellar medium, which is more volatile than H2O, but not as volatile as NH3. On Earth and probably on other planets, it exists mostly in the form of metal fluorides like CaF2 and Ca5(PO4)3F (the latter of which contains most of the fluorine in Earth's crust). I think that fluoride salts are not very soluble in silicate mantles like that of the Earth, since it is enriched in the crust relative to the upper mantle and is thus classified as a "lithophile" element.
I'm not sure how deep the depletion in the mantle goes, though. I think it may be that only the upper mantle is strongly depleted in lithophile elements and the lower mantle is not. (I'll have to check back with data* on the composition of magmas from plate boundaries vs magmas from hot-spots, the latter likely being volatile-rich magma from deeper in the mantle.) If this is true, then increasing the level of convective mixing between the upper and lower mantles of a planet might help, but be careful, because heating up mantle so more of it is molten (the most obvious way to do this) might increase the solubility of fluorides in it.
*EDIT: "My data" is mostly Composition of the Depleted Mantle, The composition of mantle plumes and the deep Earth, and Identifying volatile mantle trend with the water–fluorine–cerium systematics of basaltic glass. I haven't actually checked it yet, but one complication I'm concerned about is that, although hot-spot lavas are believed to come from the deep mantle via mantle plumes, the fact that they rise could be partially BECAUSE they are richer in volatiles than the rest of the mantle, and so not representative of the lower mantle in that regard.
Something you may want to look into is the chemical speciation of fluorine in the interiors of carbon planets. (The term "carbon planet" generally means terrestrial planets that have more carbon than oxygen, but there is also an in-between category, as rocky planets with >~1% carbon will likely have graphite crusts according to a paper I read most of.) Ionic compounds like fluoride salts can't dissolve very well into solid carbon, and carbon is likely to be solid all the way down to the core in a carbon planet, due to its hot melting curve, high thermal conductivity (cooling the interior) and the fact that carbon planets have too much carbon to react to form more volatile compounds, though it will likely form other refractory carbides like SiC if there is more C than O. If fluoride salts are lighter than graphite, and crucially are able to collect into separate fluid or maybe even solid phases that are lighter than graphite (noting that solids can sometimes act somewhat fluid over geologic time-scales), then these fluoride salts might reach the surface as diapirs. From there, they may dissolve in water or, on a very hot planet, form lakes or seas of molten salt.
EDIT: The above is particularly relevant, since the most likely largest astrophysical sources of fluorine often produce more carbon than oxygen, particularly AGB carbon stars, but sometimes also Wolf-Rayet stars.
In addition, SiF4, fluorocarbons (and hydrofluorocarbons, chlorofluorocarbons, etc.) like CF4, HF, and sulfur fluorides like SF6 are all quite volatile substances (gasses at room temperature, except for some fluorocarbons, though HF melts at 19.5°C). These could be formed in some highe temperature low-pressure environments (like how SiF4 and HF can be formed from Earthly volcanism) and could help spread fluorine into the atmosphere. I think that carbon planets, with substances like elemental carbon, SiC, and sulfides floating around, which are more reactive than oxides and oxoanion minerals like silicates and SiO2, might be more conducive to the generally endothermic reactions that produce these volatile fluorides from the relatively more refractory ionic fluoride salts.
Melting points and density are one way to enrich the surface of a planet in certain elements. Perhaps the most useful property to exploit, though is solubility. The Earth's oceans are full of sodium chloride, despite the fact that chlorine is not much more common than fluorine, and actually less common in the Earth's crust (though that's probably because the ocean is not counted as part of the crust). Why is there so much chloride rather than sulfates, carbonates, silicates, etc, because chlorides are much more soluble in water than those things. Many fluorides are also very soluble. The problem is calcium (and somewhat other Alkali Earth metals like strontium and barium). There is more calcium on Earth's surface than fluorine, and fluorine prefers to bond to Ca to make CaF2 and Ca5(PO4)3F than to bond to anything that's as common, and alkali-Earth fluorides like this have extremely low solubilities in water until you get to the extreme pressure-temperature conditions when all sorts of things, including silicates, are highly soluble in water (ruining the ability of solubility to enrich fluorine effectively). If a planet had way more potassium than Earth, however, than the fluorine might form highly soluble KF. Similarly, if a planet had less calciu than fluorine on it's surface (perhaps due to being particularly deficient in calcium), then the excess fluorine might mostly bond to sodium to make highly soluble NaF. Either way (or both ways), you could get planets where fluorides partitioned into the oceans as much as chlorides, potentially leading fluorine being similarly or perhaps more common than chloride in the world's seas. This enrichment of Na and K and/or depletion of Ca, need not be due to astrophysical processes (although forming a planet out of material that the alpa-process or at least it's late stages did not contribute much to could easily help), but could be due to the melting points of Na and K compounds vs Ca ones. This exact composition difference is part of what differentiates felsic from mafic rocks on Earth, and similar differences could be formed due to the lower melting points of Na2S and K2S vs CaS and I think Na2O and K2O are less stable than CaO. (Note, enriching a planet in sulfur relative to Earth is easy by just having it form further out in the protoplanetary disc where FeS can form, c.f., Io. Also, perhaps collisions with S-containing comets might be common furthur out.)
Maybe if you can get an ocean full of fluoride salts and/or a non-trivial amount of volcanically-originated fluorine compounds like the quite stable SiF4 and CF4 into the atmosphere than it might be plausible for life-forms to be surrounded by enough fluorine that storing energy through endothermic reactions that produce F2 might be viable.
About oceans, though: The planet probably shouldn't have too much liquid water to start out with. F2 reacts pretty quickly with H2O, so turning all the H2O into HF and O2 will increase it's lifetime in the atmosphere a lot. Life could perhaps adapt to using liquid HF as a solvent instead of water if the change was very slow and the conditions cold and/or high-pressure enough. (Pure HF is liquid -83.6°C~19.5°C at 1 atm.) Interestingly, apparently many organic compounds including proteins and carbohydrates can dissolve in HF without reacting (although they do react with F2) because C-F bonds aren't any more stable than H-F bonds. HF is less stable than other fluorine compounds the life-forms that originally made the F2 likely started out decomposing, so the autotrophs could probably adapt to make what water their biochemistry still needs, and store energy at the same time, by using the endothermic reaction:
4HF + O2 → 2H2O + F2.
F2 also reacts with rock-forming oxides, but since the these are solid and so are many of the reaction products (AlF3, NaF, MgF2, CaF2, KF, FeF2, FeF3, but not SiF4), they may form a thin surface fluoride layer before too much F2 is used up. Once there are no liquids or gases on the surface that react with water, and the solids are all covered with a thin layer of fluorides, F2 will have a much longer life-time in the atmosphere and will have at least a chance of accumulating.
I should also mention atmospheric loss as a way to affect a the composition of a planets atmosphere. Maybe if a lot of the lighter elements in an atmosphere are lost over the first billion years or so, then heavy fluorine compounds like SiF4, CF4, and, SF6 might a lot of what remains. Based on the idea of [Jean's escape], where lighter molecules are lost more easily due to thermal vibrations, this result you would probably need to get rid of CO2 in order for these fluorine molecules to become dominant in the atmosphere. CO2 is heavier than F2, so this would also prevent F2 buildup. However, if the planet then cooled, reducing the amount of Jean's escape, then, after loosing all gases up to CO2 in atomic mass, it could build up F2 again due to autotrophs endothermically breaking them down and releasing F2 to store energy and access the carbon, silicon, etc. stored in them.
(There are other types of atmospheric loss than Jean's escape, which are often more important. Radiation based methods have to contend with the fact that CO and N2 are harder to dissociate than these fluorine compounds, although the high electronegativity of fluorine does mean that it would be very difficult for radiation to ionize, likely more difficult than anything except noble gases, and this property would somewhat be donated to fluorine molecules, though not entirely, since fluorine-containing cations can exist even in stable compounds.)
Also, I'm going to repost this comment I made here:
Have you seen either of these: Alien Atmospheres: How to Make Plastic Trees (or the fiction it is referring to and links in the description) or this 2014 paper: Fluorine-Rich Planetary Environments as Possible Habitats for Life?