Use galvanized nails, as these will not rust. Birdhouses need not be painted, but the box may last longer if you paint the outside. Never paint the inside of a birdhouse. If you paint the outside, use dull (not bright or glossy) colors that blend in with the surroundings. Nest boxes that don't match the vegetation may be easier for predators to find.
While it is okay to paint the outside of a bird house, do not paint the interior surfaces or the inner rim of the entrance hole. Furthermore, use only environmentally safe paints, stains or varnishes on the outside and avoid any lead_based paints that can poison birds from fumes or ingestion. Choose a bird house design with the proper interior dimensions for the desired residents: Too small of a house may cause growing birds to smother, while too large of a house will not be attractive to nesting parents. Smaller birds could also become too chilled in a larger house if they are not huddled together when needed.