When a creature is "bounced" (returned to its owner's hand) during combat, it leaves the battlefield. According to CR 506.4, a creature that is removed from the battlefield is removed from combat — it is no longer an attacking creature and ceases to exist as a game object on the battlefield.
Combat damage is dealt during the Combat Damage Step (CR 510.1). For a creature to deal combat damage, it must still be on the battlefield and still be an attacking or blocking creature at the time damage is assigned. If the creature has already left the battlefield, it simply is not there to deal or receive damage.
This means the window matters: if you bounce an attacking creature during the Declare Attackers Step, Declare Blockers Step, or before combat damage is dealt in the Combat Damage Step, the creature deals no damage. If it were somehow bounced after damage is already on the stack (in the case of first strike, bouncing after first-strike damage but before regular damage also removes it from the regular damage step).
Concrete example: Your opponent attacks with a 3/3 creature. In response to nothing (you have priority in the Declare Attackers Step), you cast Unsummon, returning the 3/3 to its owner's hand. The creature is removed from combat per CR 506.4, and when the Combat Damage Step is reached, there is no creature present to deal damage — your life total is unaffected.
Note that any blocked creatures that were paired with that attacker also become unblocked... actually the blocking creature simply has no attacker to deal damage to, and the creatures originally blocking it deal no damage either (CR 509.1h — a creature blocking a removed attacker remains blocked but the attacker is gone).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.