Lifelink is a static ability defined in CR 702.15a: "Lifelink means 'Damage dealt by this object causes its controller to gain that much life.'" The rule makes no distinction about the target of the damage — it applies whenever the creature deals damage, regardless of whether that damage goes to a player, a planeswalker, or another creature.
When a creature deals combat damage to a planeswalker, that damage is still "damage dealt by this object" (CR 509.2 covers combat damage assignment, and CR 306.7 confirms that damage dealt to a planeswalker removes loyalty counters). Because it is genuine damage, lifelink triggers on it just as it would on damage to a player.
Lifelink's life-gain effect is a static replacement/continuous effect and happens simultaneously with the damage being dealt (CR 702.15b), not as a triggered ability. So the life is gained at the same time the planeswalker loses loyalty counters.
Example: You attack your opponent's Liliana of the Veil with a 3/3 creature that has lifelink. Your opponent blocks with nothing, so the creature deals 3 combat damage to Liliana, removing 3 loyalty counters. At that same moment, you gain 3 life from lifelink — even though no damage was dealt to your opponent directly.
Note: If the creature deals damage to multiple targets in the same combat (e.g., via trample — some damage to a planeswalker, some to a player), you gain life equal to the total damage dealt by that creature across all targets combined.
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.