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.
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 maje 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.
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 encironments. 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.
Somthing 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.
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.
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 referring to and links in the description) or this 2014 paper: Fluorine-Rich Planetary Environments as Possible Habitats for Life?