Teams that win Game 1 are 495-224 (68.8 percent) winning a best-of-7 NHL playoff series, including 5-2 in the first round this season.
"Obviously, he's feeling it," Boston coach Bruce Cassidy said of Pastrnak. "He broke through [against] Washington late, had plenty of opportunities, so that was the good news. It was only a matter of time. That line's (Pastrnak, Bergeron and Brad Marchand) really humming."
Ilya Sorokin made 35 saves for the Islanders but lost for the first time in five playoff starts. Jordan Eberle had two assists.
Game 2 will be played at Boston on Monday (7:30 p.m. ET; NBCSN, SN1, TVAS).
"We're going to need more from our lines," New York coach Barry Trotz said. "I really felt that I only had really one line [that] was on top of their game. The other lines had spurts. Right through our whole lineup, we're going to have to be much better."
McAvoy gave the Bruins a 3-2 lead at 6:20 with a one-timer at the point off a pass from Krejci. The goal came 18 seconds after Boston killed a penalty for having too many men on the ice.
Pastrnak completed his hat trick with a wrist shot from the slot at 15:50 to make it 4-2.
"Anything can happen in the playoffs," McAvoy said. " … The smallest little thing can lead to huge shifts in the game. We had that penalty, and I think the overall mindset on our bench was, 'Let's kill this thing off and go back to work.' I thought we were playing well before that happened. We were able to do that.
"Sure enough, you take sort of a nothing play, just a point shot, and it turns into a goal, and then [Pastrnak is] able to get us an insurance goal there with his skill, and we were able to get the job done."