If you are wishing to maximize your chances of finding interesting / valuable planets, then you are best off restricting your target stars to A and F only. All other star types have significantly lower chances of finding the good stuff, from a percentage point of view.
Of course, this advice has been out there for a long time now, so by doing this you are also slightly increasing your chances of finding stars that have already been discovered by someone else.
If you are after biologicals, for Codex completion or otherwise, you are better off researching which star types each lifeform can be found in. FOr example, space-pumpkins (a.k.a. "anemones" in the Codex) are often found around O class stars, so you might want to include them - though O-class stars are so rare, it's highly unlikely you'll hit one just by flying around randomly.
Which leads me to my final point: whichever star class you decide to keep that's in "last place" in the order OBAFGKM, will be the star you're most likely to see most often. Keep M in your filter, and the vast majority of stars you visit will be M class; delete M, and the vast majority will be K class. Keep only F and A, and you'll see more 'F's than 'A's. This is simply the statistics of the galaxy, where the bigger, brighter stars are rarer and the vast majority of stars are tiny red and orange dwarfs. 90% of the stars in the galaxy (both the real-life galaxy and the ED counterpart) are K class or smaller.