Imbue familiar with spell ability is not a functional spell, as written. It says that "The transferred spell's variable characteristics (range, duration, area, and so on) function according to your level," and also has a rider at the end about paying material and XP costs (which is fine), then leaves the reader to guess the details.
Let's be sensible and read "according to your level" as "according to your caster level." Caster level gets mentioned in the previous paragraph, and it's much more common for a spell to scale off of caster level than character level (otherwise a multiclass character could potentially get more powerful spells via imbue familiar with spell ability). So that mostly works: anything that would scale off of caster level scales off of the master's caster level. Fine.
But what does transferring "a number of spells and the ability to cast them" actually do? Rules as written, "ability" has a particular meaning, as defined in the PHB glossary:
ability: One of the six basic character qualities: Strength (Str), Dexterity (Dex), Constitution (Con), Intelligence (Int), Wisdom (Wis), and Charisma (Cha). See ability score.
So if Mialee the wizard grants her familiar (whose name is "Raven Familiar" as far as I can tell) the ability to cast wall of stone, the raven would also get an Intelligence score of 15: that is, the ability required to cast wall of stone, which is a 5th level spell. The raven would still need to grow some hands to perform the somatic components, and the ability to talk (which it has, but many familiars do not). The material component, a small block of granite, would disappear from somewhere on Mialee's person, as per the final paragraph of imbue familiar with spell ability.
If this sounds ridiculous, I agree. Some amount of houseruling is required to keep imbue familiar with spell ability from being a very silly spell. I personally would read "the ability to cast them" as letting the familiar skip the verbal and somatic components of the spell (or have it function like the Surrogate Spellcasting feat from Savage Species, where they can ribbit or caw or whatever in place of normal arcane chanting). I would also read it as bypassing the normal ability score requirement for the spells, rather than literally granting them the requisite score. This would also set any save DCs to the minimum possible, unless the familiar actually has a higher relevant casting ability. So a fireball would have a DC of 10 + 3 (its level) + 1 (since a 13 is the minimum casting stat, which gives a +1 bonus).
All of this is to say that the RAW answer to your questions is: the spell just doesn't really work. That said, there's absolutely no basis to assume that the player gets to use all of his stuff as though he were casting the spell. It's very clear that the familiar is casting the spell, not the master. The exact mechanics of that are imprecise, but most of the master's benefits shouldn't apply.
So, in order, will the spell:
- benefit from any magic items the wizard had when preparing the spell? (like an empowered spellshard or a holy symbol of storms);
If those items increase caster level, then that will affect imbue familiar with spell ability. Otherwise, no.
- benefit from traits, racial or class features the wizard had when preparing the spell? (like the Spellgifted trait, a bloodline or other class feature);
Again things that affect CL—like the Spellgifted trait—will affect IFWSA, because that determines all the variables. Other modifiers will not.
- benefit from any metamagic feats that are applied when you prepare the spell? (like energy substitution, empower or widen spell)
Yes. The spell gives a specific spell to the familiar. If that happens to be an empowered fireball, then that's what the familiar can cast (and might act as though the spell has an accordingly higher casting ability for save DCs, oddly).
- benefit from any metamagic feat that are applied when casting the spell? (like born of three thunders, snowcasting or reserves of strength?
No, unless the familiar has the metamagic feat.
- would it be the same with the above if the character in question were a sorcerer instead of a wizard, since they don't prepare spells?
This doesn't change much, with the exception of wizards being able to give the familiar metamagic feats, whereas the sorcerer can't really do that.
In short, imbue familiar with spell ability needs a bit of house ruling to function. Specifically, what the save DCs are and whether or not the familiar needs to be able to perform the verbal and somatic components of the spell are unclear. What is very clear, however, is that the familiar is the one casting the spell, not the master. The only feature of the master's that the spell uses is his caster level (as it was when he cast imbue familiar with spell ability). The familiar would need to have any feats, items, or special features to apply them to the spell, not the master.