Moldings look great when they are tightly fitted together, but when gaps open up between them, particularly at corners, they can look somewhat shabby. Fortunately, fixing this situation is very easy.
If mitered corners of base moldings are separating, squeeze a little wood glue in the joint and re-nail with finishing nails. Set the heads and wood-putty to match. If nails don't hold, ask your hardware dealer for trim screws--very narrow screws with a tiny head that can be driven with a drive bit in an electric screwdriver or drill.
If trim around windows and doors begins to separate at the corners, you can squeeze some wood glue at the joint and then predrill a pilot hole and drive a 6-penny finishing nail through the side of one molding piece into the end of the other. Gently set the nail head beneath the surface (don't split the wood), then fill with wood putty or filler and touch-up with paint.