A surprise spell must be a targeted spell
The arcane trickster special ability surprise spells, in part, says, "At 10th level, an arcane trickster can add her sneak attack damage to any spell that deals damage, if the targets are flat-footed." Unlike, for example, the spell magic missile that has the entry Targets: Up to five creatures, no two of which can be more than 15 ft. apart, the spells black tentacles and fireball have no Target entries so they have no targets (and, in fact, most area spells don't). Employing a targeted spell is one of the requirements for the special ability surprise spells to trigger.
Merely being invisible is insufficient to render a foe flat-footed against the invisible creature's attacks. The invisible attacking creature does gain a +2 bonus on its attack rolls and the foe does lose it's Dexterity bonus to AC against the attack, but the foe is not actually considered flat-footed against attacks launched by the invisible creature, therefore the special ability surprise spells won't trigger by virtue of invisibility alone.
So to benefit from the special ability surprise spells, the arcane trickster can, for example, on the first round of combat cast a spell that has a Target entry at typical foes (like those without the extraordinary ability uncanny dodge) that have yet to act during that round. In such circumstances, the arcane trickster's special ability surprise spells usually triggers.