The Sharks, with the NHL's top power-play unit, converted two of three chances. Ryane Clowe scored his first career NHL goal, Mike Grier added an empty-net goal and Evgeni Nabokov stopped 18 shots for San Jose.
Vincent Lecavalier and Martin St. Louis scored power-play goals for the Lightning.
Thornton scored at 4:02 of the first on the Sharks' only power play during the first two periods. The centre hadn't had a goal in 12 previous games since April 15.
Clowe, who returned after missing the past six games because of a foot injury, made it 2-0 at 2:51 of the second. Grier set up the goal, beating Tampa Bay defenceman Doug Janik to the puck behind the net and passing it to Clowe.
Grier completed the scoring with his empty-net goal with 1:21 left.
The Lightning, who entered the game tied for 23rd in the power-play rankings, had five consecutive man-advantage chances, but converted just one when Lecavalier cut the deficit to 2-1 with 3:52 left in the second.
Lecavalier has a goal in four straight games. Vinny Prospal picked up his 300th career assist on the goal.
After Marleau scored at 10:51 of the third, St. Louis pulled Tampa Bay to 3-2 with 6:58 to play. St. Louis has six goals in his last four games.
Tampa Bay finished 2-for-7 on the power play.
Notes: Thornton has 13 assists this season. ... Sharks D Matt Carle stopped St. Louis' point-blank scoring attempt in the second while Nabokov was down on the ice during a goal-mouth scramble. ... The Lightning was been outscored 15-5 in the first period. ... San Jose LW Ville Nieminen and D Josh Gorges were scratched after playing in the Sharks' first 11 games this season.