Republicans won the popular vote in every presidential election from 1968 through 1988 with the exception of the post-Watergate election in 1976 and even then they only lost by 2 points. Not only did they win, they won big with popular vote margins around 10% or higher in all of those elections except 68' and 76'.
Since then, Republicans have lost the popular vote every time except in 2004, which was only a 2 point win.
So it seems like there's a clear inflection point in the 1990s. What happened? Was there a particular group of voters that actually switched from consistently voting Republican to consistently voting Democratic? Was it driven by demographic changes? Something else?
Your question is built on a bit of a faulty premise. Presidential elections happen only once every four years, and so looking at a 20-year period only gives you five datapoints to draw from. What political scientists do instead is they tend to look at a much longer viewpoint when thinking about historical trends in competitive presidential elections, or they also include midterm elections where only Congress is up for election.
Why do I bring this up? Because if you zoom out beyond the period from 1968 to 1988, you'll notice that our current period of highly competitive elections is caused by the nature of the political environment rather than the successful party, and that it really isn't a Republican or a Democratic thing to be winning by large margins.
In the 80-year period between 1904 and 1984, 12 of 21 elections were won by 10 or more points; 8 by the Republican candidate, and 4 by the Democratic candidate. Since 1988, there hasn't been a single election won by more than 8.5 points (Bill Clinton in 1996). The post-Reconstruction Gilded Age from 1876 to 1900--the last time that the two parties were as polarized as they are now--saw similarly close margins to what we are experiencing nowadays.
So the question you should be asking is "Why did American politics become more polarized in the 1990s?" The answer there is complicated but generally correlates with the Republican Revolution of 1994, where the Republican Party took control of the House of Representatives for the first time in 40 years. Now, I'm not an expert in the Republican Revolution, so I can only give you a systems-level explanation of its causes, but in essence, it was the culmination of decades of political sorting as the two parties became more ideologically distinct from each other. Structural factors (such as the primary system, negative partisanship, and the rise of news television) incentivized further polarization between the two parties, and that large gulf between them has meant that American presidential elections have been much more black-and-white in the past thirty years or so, which has made them more competitive as the number of persuadable voters has shrunk.