Your 7th level rogue has 1HP. Rogue takes 10 points of damage (which brings her to -9HP). In response, the talent activates and gives 7tHP (bringing the total to -2). You are still unconscious, but you now have 6 rounds to have a buddy pour a healing potion down your throat, attempt first aid, or for you to stabilize normally.
Assuming instead that the damage is 5 points (instead of the 10 you use in your question), the pattern goes: 1HP, -5HP from attack (to -4). Resiliency kicks in giving 7tHP (bringing total to +3). Now the Rogue has the opportunity to withdraw, and drink the healing potion in her backpack. Or perhaps beg a heal spell from the Cleric.
As you observed, you can't trigger Underhanded in combat on its own
You are 100 percent correct that since they can only take a Standard or a Move action RAW (free actions are also allowed). At best the drawing of a hidden weapon can be made to be a move action (but you still only get 1 or the other) utilizing the Quick Draw Feat.
Bandit's can easily make use of underhanded
The rogue Bandit archetype gains Ambush(Ex) at the cost of Uncanny Dodge.
Ambush (Ex)
At 4th level, a bandit becomes fully practiced in the art of ambushing. When she acts in the surprise round, she can take a move action, standard action, and swift action during the surprise round, not just a move or standard action.
Thus the player would be able to (with Quick Draw) pull the weapon out with their move and still have a standard to attack the enemy with.
The Betrayer Feat might apply
Benefit: When you succeed at a Diplomacy check to change a creature’s attitude, you can draw a weapon and make a single melee attack against that creature as an immediate action. If you changed your target’s attitude to friendly or better, your target is considered flat-footed against this attack. If the target survives, it takes a –2 penalty on its initiative check for this combat. Once you attack a creature, its attitude becomes hostile.
However the wording seems to imply that combat begins after the betrayer attack, but then again Surprise is worded extremely vaguely (at your DM discretion).
Surprise
When a combat starts, if you are not aware of your opponents and they are aware of you, you're surprised.
Ostensibly the target of the Betrayer attack knew the other person was there, but not as a combatant and as a DM I would allow the attack to be treated as a Surprise round attack.
Possible workaround through items
My Pathfinder knowledge is insufficient to know if this is really RAW, but both the Sword Cane and the Switchblade can be drawn as a swift action. Whether this still applies when the weapon is hidden is something I'm not able to divine. Some people on Paizo's forums seem to think its workable and others don't.
Best Answer
What the other answers have missed is that the Sniper archetype received an errata five months before the question was asked. Here is the errata:
Notice that unlike with Deadly Range, there is nothing in the new ability that says "this replaces the talent gained at 2nd level." So that's where the question comes from.
The RAW answer, then, is that the Sniper does get a talent at level 2. Old copies of the ACG wouldn't reflect this change, nor would the table on PFSRD (because the table wasn't updated when the errata was released, even though the archetype's page was). HeroForge is probably making the same mistake in assuming that Deadly Sniper replaces the talent gained at level 2 the same way that Deadly Range did.
(That said, it's probably RAI that the talent is replaced by the archetype. But again, the strict RAW answer is that the talent is not replaced.)