When I'm installing painted trim -- baseboards, window or door trim, etc. -- I usually prime and paint it before installation. That way I only have to fill the nail holes, sand smooth and paint one coat after installation.
If I want my trim to have a natural wood finish instead, how much of the process of applying wood conditioner, stain and two or three coats of varnish can I do before I install the trim?
Sure. Why not? If you have a brad gun with headless pins, they leave a hole that would be almost undetectable from a few feet away anyway. With a little care about where you place the pins, you might even skip the step of filling the holes, certainly so those in baseboard and possibly in ceiling trim.
For trim at eye level where it may be more critical to hide the holes though, the right color wax crayon used for filling nail heads will do wonders. You can buy them in wood colors for this purpose. Rub a little in, then clean the surface with a cloth or your finger.
The main issue would be with covering any nail/screw holes after you've fixed it to the wall. Other than that I can't see a problem with varnishing before hand.
As each coat of varnish darkens the wood you could end up with a darker patch over each nail. However, using the same approach as usual - leaving the last coat until after installation will reduce this.
Another alternative would be to glue the trim in place - that way there's no nail holes to fill.
I always prefinish stained, urethaned or varnished trim when possible. Finishing trim on a flat horizontal surface really helps in reducing runs and drips. With a little effort, you can mix a couple of colors of wood filler to match whatever color you have on your trim. Just don't go crazy with the finish nailer and turn your trim into swiss cheese! LOL. Another little tip is to use a good grade urethane adhesive behind your trim to help eliminate bows and gaps. This also allows you to use fewer nails so less nail hole filling.