I'm currently studying the relationship between Hispanic Americans and the Democratic Party and it came to my attention that prior to the 1970s and 80s, Texas was politically primarily a Democratic state, much to my astonishment. In my short lifetime, Texas is often caricaturized as the wild frontier of gun-toting, hardline Republicans. Now while I know this is far-fetched itself, and that the actual modern political culture is much varied in Texas, it still seems to be a decidedly Republican-leaning state, despite it's historically pro-Democrat leanings.
What do sources link the major switch of party affiliations to, and why did this happen? Also, tangentially, are there any other major historical party switches in other states that my brief awareness has left me ignorant of?
Yes, "The Southern Strategy" is the short-form US History 101 exam answer to this question.
Prior to the Civil Rights Act, there were two major groups of Democrats: Southerners who were Democrats because of family legacy ("That's who my daddy always voted for") and associations of the Republican party with the Abolitionist movement, and the Northeastern reformer types we would understand as the modern Democratic Party. From the 1940's onward, the Northeastern branch of the party started to become dominant, adding a pro-civil rights plank to the party platform and completely reversing its segregationist stances.
So you suddenly have this big clump of disgruntled southern Democrats who are pissed at their party (who they've been mostly supporting for kind of abstract reasons up to this point), and a Republican party eager to snap up those votes by opposing the Civil Rights Act.
As to the larger question of "gun-toting wild frontier" type stuff, you're going to want to read up on what tends to be called the "Culture War". In the 1960s (well probably starting post-WW2 but most famously in the '60s) all these huge social issues gelled together around the Southern Strategy shift in political party bases, which crystalized American socio-political culture into two camps around both political party (Red State vs. Blue State) and also around a lot of social ideas like feminism, racial equality, religion, urban/rural divides, respect for authority/"The Generation Gap", attitudes toward war, and even down into things like music and art and pop culture. So by the Reagan years you have the stereotypical Texan aligning with gun culture, conservative religion, jingoistic ideas about war/the military, and all the other ways we have of describing the "Red State" mentality.
If you're interested in the finer points of the Southern Strategy, the Culture War, and the specific individuals who used those ideas to flip the South politically, I can't recommend the book Nixonland enough.