This is fueling Democratic opposition. Many Democratic senators feel should Kavanaugh be confirmed, and should the government want to indict the president then Kavanaugh would vote to squelch the criminal action.
Here, for example, is what Democratic U.S. Sen. Cory Booker of New Jersey tweeted about that:
The fact that Kavanaugh believes that a President should not be subject to civil litigation or criminal investigation while in office means that Trump just nominated a justice who has already reached conclusions on these serious questions. That should raise enormous red flags.— Cory Booker (@CoryBooker) July 10, 2018
But what's interesting to me is the context of Kavanaugh's comments. From ABC News:
Kavanaugh was a key player in the investigation that led to President Bill Clinton's impeachment, but a decade later he wrote that the experience, coupled with his time working for President George W. Bush, had persuaded him that presidents should not have to face criminal investigations, including indictments, or civil lawsuits while they are in office. He said Congress should pass a law temporarily protecting presidents from such distractions in office.
In other words, Kavanaugh was thinking about the impeachment of a Democratic president at the time he wrote his thoughts.