Here is the entry for "Shit (Stuff) happens" in Doyle, Mieder, and Shapiro, The Dictionary of Modern Proverbs (2012, Yale University Press):
Shit (Stuff) happens.
1944 Lee Thayer, Five Bullets (New York: Dodd Mead) 232: "Was it just chance? Is there such a thing as pure chance? As 'Vic and Sade' are wont to say, 'Stuff happens.' Yes. Stuff does happen" ("Vic and Sade" was a comic radio show popular in the 1930s and 1940s). 1969 Jean Hersey and Robert Hersey, These Rich Years (New York: Charles Scribner's Sons) 236: "I always like to remember the simple comment of an intelligent friend of ours in the face of a family crisis that came out of the blue. 'Oh, well, stuff happens.' she said with a sigh as she began to plan the next step ahead." 1978 Wesley Brown, Tragic Magic (New York: Random House) 98: "Once you know the reason why shit happens, you shouldn't have to ask the question anymore." 1983 Connie Eble, "UNC-CH Campus Slang—Spring 1983" ({Chapel Hill NC: for the author} Ditto-reproduced): "Shit happens" (saying collected from a student). YBQ Modern Proverbs (83); Mieder (2005a); Rees (2005) 6. The proverb commonly expresses a sort of stoic resignation at the vagaries and sorrows of life. Even though the citations for "Stuff happens" antedate the ones for "Shit happens," it is not unreasonable to suspect, in some instances at least, that stuff represents a euphemistic replacement of shit—stuff having been more acceptable in print (and in polite oral discourse as well). The "Shit happens" form achieved notoriety in the 1980s when its appearance on bumper stickers occasioned arrests and criminal prosecutions—giving rise to allusive (anti-proverbial) variants that substituted for shit the name of some disliked public figure or group.
The same reference work states that the allied phrase "Shit happens and then you die" emerged by 1991, as a paraphrase of dialogue from the film River's Edge.
As a side note, I observe that, when people get together to discuss a stunning development at work (for example), someone may say, by way of breaking the ice (or simply acknowledging the obvious), "Well, that just happened." I've been aware of this usage for only a couple of years, but it may be considerably older than that. I have no idea whether it began as a play on the truism "Shit [or stuff] happens," or whether it emerged independently of that phrase.
-----------------------------------------------------------------------------------
UPDATE: To supplement the information cited above, I ran Google Books searches for “shit happens,” “stuff happens,” and various other “X happens” phrases. For the first two phrases, there wasn’t much beyond what The Dictionary of Modern Proverbs reported; but other phrases (notably “war happens,” “magic happens,” "life happens," and “[queer] things happen”) go back at least to the early decades of the twentieth century. On the strength of those results, I suspect that formulation of the “X happens” wording arose independently of “shit [or stuff] happens.”
With regard to the “then X happened” wording that the OP associates with “then Star Wars happened,” I investigated a single phrase of this type—“Vietnam happened”—and found relevant Google Books matches from 1970 and 1976. This form may go back considerably farther than 1970—though I haven’t run any relevant searches to find out—and in any case it may have no connection to the popular expression “shit [or stuff] happens.”
Following are some interesting matches that my Google Books searches turned up for the phrases “shit happens,” “stuff happens,” and “Vietnam happened,” as well as for the “X happens” alternatives “war happens,” “[queer] things happen,” “trouble happens,” “magic happens,” and “life happens.” I’ve put the relevant search phrase in each excerpt into boldface for ease of identification.
Shit Happens
From Carl Werthman, “The Police as Perceived by Negro Boys,” in The American City: A Source Book of Urban Imagery (1968):
Finally this cop’s buddy say, ‘You want to run them in Joe? They ain’t really done nothing.’ So then Joe stops. He say, ‘Now all you black Africans pick up your spears and go home! I don’t want you guys walking up the street!’ We just coming up the street like we always do coming from the show. That shit happens all the time. There ain’t a day that we don’t get roused like that. (Negro, 16 years old)
Stuff Happens
From National Association of Student Personnel Administrators (U.S.), Proceedings of the Annual Conference (1966) [combined snippets]:
We have a long way to go. Perhaps we are in a developmental state similar to that of psychology at the turn of the century. But we cannot respond to present requirements and possibilities by turning the clock off. The times will not permit it.
As my four year old son Merrill observed the other day, "Stuff happens.” (Laughter) Stuff is happening all around us. (Laughter)
From Laird Koenig, The Dozens (1969):
STAN. In revolutions stuff happens, you know? Like a bayonet. Or a machine gun. Or somebody hits him with something.
From Ted Thackrey, The Thief: The Autobiography of Wayne Burk as Told to Red Thackrey (1971) [combined snippets]:
“The church says there’s no divorce.”
“Yeah. Sure, baby. Only—sometimes stuff happens and—just because of the law and everything—people got to get them. No matter what."
Vietnam Happened
From an unidentified article in Newsweek, volume 75, issues 18–26 (1970) [combined snippets]:
SDS could hardly be called revolutionary back then. The civil-rights struggle was the order of the day, and "participatory democracy" was the style. Somehow it seemed to work in the early days: long, rambling, talky meetings wound up in decisions that appeared to have welled up from the group, not to have been imposed from above. But then a number of things happened that led the movement to alter course.
Most important of all, Vietnam happened.
From Allen Freeman Davis & Harold D. Woodman, Conflict and Consensus in Modern American History, Volume 2 (1976) [combined snippets]:
Rather than a new departure in our way of looking at the world, it was quite consistent with the unexpressed principles of our foreign policy. Vietnam happened because it was time for it to happen, because we had the military power to make it happen.
War Happens
From Rose W. Lane, Henry Ford’s Own Story: How a Farmer Boy Rose to the Power That Goes With Many Millions Yet Never Lost Touch With Humanity (1917):
"Here is a world where war happens," we say. "If a war should happen to us what would we do? Let us begin to prepare for war. Let us take war into our calculations. Let us be practical."
And Henry Ford, reading the papers, listening to the talk of the men in the streets, saw the object lesson of his great organization disregarded.
From House Committee on Foreign Affairs, American Neutrality Policy (1939) [combined snippets]:
Mr. JOHNSON. When does the freedom come in, when we pass the law in the first instance, this freedom of choice? I am trying to find out where that enters the picture.
As I understand it, we pass the law that says automatically when a certain thing happens, that certain things should be done, and then war happens and that is automatically done. Then when do you exercise your freedom of choice?
From Lewis O. Anderson, “Making Bogey of Nationalism” in National Republic (1940) [snippet]:
War happens, so it is echoed back and forth, because one nation wants something another nation wants. On the contrary, war happens because a nation does not know what it wants. A nation without vision perishes. War is a mode of perishing, a symptom of critical illness.
From Protestant Digest, volume 3, issue 10 (1941) [combined snippets]:
It is not enough (moreover it is superfluous) for us to argue the pros and cons of going into the war or staying out. Our State Department is unlikely to consult us. Even our State Department has less discretion in this decision than many people think. War happens. The time to stop it has long passed when it arrives. Like an iceberg in a fog it looms too suddenly for the reversing of the engines to avoid the crash. War is the inescapable consequence of the kind of "peace" which precedes it.
Things Happen
From H.G. Wells, Tono Bungay (1909):
That’s what Wimblehurst is! Cold Mutton Fat!—dead and stiff! And I’m buried in it up to the arm pits. Nothing ever happens, nobody wants things to happen ‘scept me! Up in London, George, things happen.
And again, much later in the same book:
I finished and hesitated on some vague foolish lie. “No,” I said, a little ashamed of the truth. “Do you? I’ve been too busy.”
“I’m just beginning—just as you were then. Things happen.”
From Carson McCullers, Reflections in a Golden Eye (1941):
An army post in peacetime is a dull place. Things happen, but then they happen over and over again.
From Henry Miller, My Anchorage,” in Tropic of Capricorn] (1961), reproduced in Henry Miller on Writing (1964):
It came without effort, born of a second, a miracle you might say, except that everything which happens is miraculous. Things happen or they don't happen, that's all. Nothing is accomplished by sweat and struggle.
Queer Things Happen
From Henry F. Reddall, Wit and Humor of the American Bar (1905):
Some queer things happen in the New Jersey courts sometimes.
From a letter from Harriet L. Keeler to Henry C. King (January 17, 1912), reproduced in Harriet L. Keeler, Our Native Trees and How to Identify Them (1900/2005):
I appreciate all the good wishes that are coming to me. Queer things happen in this life, and one of the queerest is that which has happened to me.
From B.M. Bower, Good Indian (1912):
“I suppose I’ve got to deliver that immediately, at once, without delay,” she said. “There’s supposed to be an answer. Chicken, some queer things happen in this business. Here’s that weak-chested, hollow-chested Saunders, that seems to have just life enough to put in about ten hours a day reading ‘The Duchess,’ getting cipher messages like the hero of a detective story. And sending them, too, by the way. We operators are not supposed to think; but all the same—“
From I.A.R. Wylie, “The Inheritors,” in Good Housekeeping (August 1922):
“Well, I’d have thought it funny, too—eight years ago. If anyone’d told me, I’d have laughed, too. But you never know. Queer things happen."
“Queer things,” she echoed. “Queer things.”
Trouble Happens
From Arnold Palmer, Arnold Palmer’s Golf Book (1961) [snippet]:
But, as I said at the beginning of the chapter, trouble happens to everybody.
Magic Happens
From Bliss Carman, The Making of Personality (1906):
But to feel the enchantment of their rhythms, the sorcery of their complex harmonious movements, as they wheel through space in their silent arabesques; to follow and obey their delicate law and yet modify their evolutions at pleasure; to produce new and almost infinite varieties of flying curves out of their few elementary figures, is to experience the veritable artistic rapture, and be carried out of oneself into the region of true creation where magic happens and beauty is born.
From Bronislaw Malinowski, Coral Gardens and Their Magic (1935) [combined snippets]:
Some of these questions we are in a position to answer. Let us start from the purpose of magic. Imaginary it is from our point of view, but is this a reason for dismissing it as socially and culturally irrelevant? Certainly not. Magic happens in a world of its own, but this world is real to the natives.
From an unnamed book review in The Catholic Library World, volumes 23 & 24 (1951) [snippet]:
Two little girls, Delphine and Marinette, live with their mother and father somewhere in France. Magic happens and the animals on the farm talk, but all the people are lovable.
From Current Biography Yearbook (1960) [snippet]:
When it comes to designing, the fabric is my master. I can’t draw, I can’t paint, I can’t even sew, but put a piece of fabric in my hands and magic happens” (Christian Science Monitor, May 18, 1959).
Life Happens
From “Microcosms” in The Century Magazine (July 1902):
Life happens to some folks only in novels.
From R.A. Scott-Thomas, The Making of Literature (1929):
Whatever philosophic language we may use or discard, it is this reality from which the artist starts, the reality that we all objectify as life. It presents itself to us with all the fortuitousness of fact, fragments of experience that come upon us in the illogical time sequence of a day’s events—waking, a bath, breakfast, a catastrophe discussed in the newspaper, reflections about catastrophe, a telephone bell, letters written, a caller, more reflections, more ill-assorted atoms of experience. That is how life happens—impression following impression—and that is all it seems to be for Croce till the mind begins its conjuring-tricks.
From M. Lulofs, The Other World (1935) [combined snippets]:
First the Deli General Trading Company; then the Customs House, where I was a clerk. Then some salesrooms. Then I was an inspector on the railway; and now I'm making parasols. I'm still alive, as you see. Why should I work myself to death? Life happens only once, Vos; at least, let's say this life. At any rate, I'm my own boss.
From Oswald Schwarz, The Psychology of Sex (1949) [snippet]:
In short, life happens to animals but Man is the maker of his destiny.
From Robert E. Spiller, A Time of Harvest: American Literature, 1910–1960 (1962) [snippet]:
Each hero approaches the condition of Chaplin and Keaton, who seem innocent of previous experience. Life happens to all of them for the first time. Its unseen threats are bewildering, complex, unnerving —Indians in ambush, the consequences of crime, the possibilities of corruption, and even the results of enjoying a reputation as a fast draw.