For the best familiar, I think you can use most of the tips given here.
For example, I'd recommend taking Improved Familiar to gain one of the familiars from page 200 of the DMG. Then, have some cleric cast planar familiar on it to add one of the planar templates. Then use the animate dead familiar spell to bring it to unlife (though it does have to die first, costing you some XP), and then apply the spellstitched template to it.
You can have a familiar that's extraordinarily powerful with this combo, or some other one that you can think of. Can anyone else think of a familiar that'd be ridiculously powerful?
For crits and giggles, here's an example of the above combination. This is an imp familiar with a 20th level master, with the fiendish template applied, then animated with animate dead familiar at 20th caster level, with the spellstitched template applied also. Note that these would all have to be applied in the above order to be effective; it's legal to add the fiendish template to an evil Outsider (so sayeth Savage Species). The type for the creature is Undead, not Outsider, once it's killed and brought back (the animate dead familiar spell doesn't say anything about the creature type, and the type must be Undead to make it Spellstitched). The increased intelligence increased some skill modifiers, but didn't give any extra skill points (I think that's correct). I'm only using the highest spell resistance and energy resistances, but leaving all the different types of DR side-by-side, since I think that's how gaining new DR works. The spells chosen for the spellstitched spell-like abilities are mage armor, ray of enfeeblement, scorching ray, and shatter, each set to be usable twice per day.
Fiendish Spellstitched Undead Imp, Familiar: CR -; Tiny Undead (evil, lawful, extraplanar); HD 20; hp 1/2 master's; Init +3; Spd 20 ft., fly 50 ft. (perfect); AC 30, touch 15, flat-footed 27; Base Atk +3; Grp -5; Atk +8 melee (1d4 plus poison, sting); Full Atk +8 melee (1d4 plus poison, sting); Space/Reach 2-1/2 ft./0 ft.; SA constitution drain, poison, smite good, spell-like abilities; SQ alternate form, darkvision 60 ft. deliver touch spells, DR 5/good or silver, DR 5/magic and silver, DR 10/magic, empathic link, fast healing 2, improved evasion, resistance to cold and fire 10, speak with master, SR 25, turn resistance +2, undead qualities, granted abilities; AL LE; SV Fort +5, Ref +8, Will +6; Str 10, Dex 17, Con -, Int 15, Wis 12, Cha 14.
Skills and Feats: Diplomacy +8, Hide +17, Knowledge (any one) +8, Listen +7, Move Silently +9, Search +8, Spellcraft +8, Spot +7, Survival +1; Dodge, Weapon Finesse.
Poison (Ex): Injury, Fortitude DC 13, initial damage 1d4 Dex, secondary damage 2d4 Dex.
Spell-like Abilities: At will - detect good, detect magic, invisibility (self only); 1/day - suggestion. Caster level 6th; Once per week an imp can use commune to ask six questions (otherwise as the spell cast by a 12th-level cleric). 2/day - mage armor, ray of enfeeblement, scorching ray, shatter. Caster level 20th; save DC 10 + spell level.
Alternate Form (Su): As polymorph, caster level 12th, except that an individual imp can assume only one or two forms no larger than Medium. Common forms include monstrous spider, raven, rat, and boar.
Constitution Drain (Su): Living creatures hit by the imp's sting must succeed at a Fortitude save (DC 18) or suffer 1d6 points of permanent Constitution drain.
Smite Good (Su): Once per day the imp can make a normal melee attack to deal +20 damage against a good foe.
Undead Qualities: Darkvision to 60 ft. Immune to mind-affecting effects, poison, sleep effects, paralysis, stunning, disease, death effects. Not subject to critical hits, nonlethal damage, ability drain, energy drain, damage to its physical ability scores (Strength, Dexterity, and Constitution), as well as fatigue and exhaustion effects. Immune to any effect that requires a Fortitude save (unless the effect also works on objects or is harmless). Not at risk of death from massive damage, but when reduced to 0 hit points or less, it is immediately destroyed. Not affected by raise dead and reincarnate spells or abilities. Resurrection and true resurrection can affect undead creatures.
This imp's natural attacks and wielded weapons are treated as being evil and lawful for the purpose of overcoming damage reduction. It's natural attacks are also treated as being magic for the purpose of overcoming damage reduction. If in range of its empathic link with its master (one mile) it cannot be turned or rebuked. It can speak Infernal, Common, and Celestial.