The Italy winger drilled a shot into the far corner in the 83rd minute to celebrate his first league goal since July 26 2020, a run of 513 days.
It came after Moise Kean headed home the opener in the first half to set Juve on course for a victory that extends second-bottom Cagliari's winless league run to 11 matches.
The Old Lady climbed into fifth place on 34 points, registering their fourth clean sheet in the last five league outings in the process.
Massimiliano Allegri's side can now enjoy a two-week winter break but when they return in 2022, Juve face league clashes with Napoli, AS Roma and AC Milan in January, before facing Atalanta on Feb. 12.
"It is fun when you get to these moments in the season. We have done well in the last few games but January is an important month," Allegri told DAZN.
"I would be happy to get to the end of February with this distance from the teams at the top, because between now and then we have to play all the top teams. Then they will face each other and we will have a better fixture schedule."
The 21-year-old made the breakthrough when a Bernardeschi shot was deflected into his path and he reacted quickly to head the ball back across goal and beyond goalkeeper Alessio Cragno.
The visitors were made to pay for their profligacy when Bernardeschi fired home in the 83rd minute.