Stringing Along Good tuning starts with quality strings. Not all strings are created equal. Similarly, stainless steel and nickel strings will not intonate the same way. Whatever type of strings you favor, find a brand that offers consistent quality and stick with it. You'll do less tweaking in the long run.
Most guitarists find that heavier-gauge strings hold their tuning better than lighter ones.
There are exceptions, including James Burton, guitarist for Ricky Nelson and Elvis Presley, who has made history using 0.008s. Burton pulls it off with a great ear and very light touch mere mortals beware. Before you start stringing your bass or guitar, lubricate the nut slots with pencil lead or automotive graphite powder. Over time, a string's windings will create tiny divots in the nut slots, and the graphite will keep the string from catching on those divots. You should also check to make sure that your nut slots are cut wide enough.