It depends ;)
I don't tend to do a final sand for the very reason you mention. However there have been times when the finish hasn't been to my liking so I have sanded - but in these cases I use the finest grade paper and sand very lightly to just take off the drips and/or dust flecks that have settled on the wood.
So if the penultimate coat is good you might be OK without sanding, but sanding does provide something for the final coat to bind to if the previous coat was applied some time ago, so ultimately it will provide a more durable finish. If you are painting the second coat as soon as the first coat is dry then you don't need to bother.
If you select boards with knots, there is a good chance that they will bleed through, even if you use a sealer or shellac based primer. The resins in knots is persistent.
Clear boards are usually used for moldings, including baseboards. You could also use MDF (medium density fiberboard) or solid vinyl composite molding. When painted, they are hard to distinguish from wood in most applications. (I think they look a little too smooth and I prefer wood). For painted applications, there is also fingerjoint molding, which is made of interlocked short pieces and is cheaper than clear boards. Much pre-primed molding is fingerjoint. Occasionally these joints may show if the quality is not high.
For wood or MDF, a light sanding with 120 grit paper is recommended to remove milling glaze and to give the wood a tooth to better take paint. An orbital sander is fine
Then prime and paint. Many prefer oil based primer on raw wood and MDF. Some vinyl says it can be painted directly, but I would also give it a sanding (or avoid it unless necessary, such as in outdoor uses).
Latex paint is fine for a finish coat, but it tends to look less smooth than oil (alkyd) based finishes. Adding a leveling agent like Floetrol helps, but nothing lays as smooth as a good oil based enamel.
(P.S. To me, using a really smooth straight clear board, in furniture or in molding, is appreciating and honoring the wood, the tree, nature. But to each his/her own.)
Best Answer
If you want to do a good job, I'd sand until you begin to remove some of the stain from the wood (in effect, sanding the wood)
Then I'd prime the wood with Zinnser Bin wood primer than paint over that.
They have a fast drying version of this; I tried it once; don't use it. you need to move very very quickly. Use the normal drying one and it'll give you more time to work with it.
Wood "sweats" and the stain will eventually come through the paint. Removing the varnish and priming it with a wood primer (not a wall primer) will seal the wood and keep the new final paint from flaking / showing stain from the wood.
For some of the few window casing's I kept in this house and haven't removed, it's held up awesomely for 3 years now. I also had to use a heat gun to get 3 layers of paint off, but thats a different issue. I wouldn't use a heat gun if its varnished. Sand it.
I did this same process to any wood doors that weren't painted and all the wood trim we installed after gutting the rooms.