If you want to put a simple political take on it, The Joke is a reaction to the eventual takeover of Czechoslovakia by Communism. Kundera continually combines the personal with the political during the entire book. All of the characters in the story are victims. What are they victims of? "The joke history has played on them."
For example, Ludvik always seems to be having some kind of tragic experience, a typical result of Communist overreaction. Ludvik's and other characters' devastation is certainly connected to the Communist takeover of Czechoslovakia.
The political bleeds into the cultural in regard to devastation as well (again blamed on Communism). There is an attack on Christianity and even an attack on folk music! It is the Communist way to squash the culture of a country in a form of fake unity. Kundera isn't afraid to show this with his dark humor. Kundera shows through Ludvik and others that there is now a youth culture completely devoid of Czechoslovakian ways.
What is the personal "joke" of the book (and how does it connect to politics)? Well, Ludvik is obviously trying to twist the knife with his ex-lover by sending this note:
Optimism is the opium of the people! A healthy atmosphere stinks of stupidity! Long live Trotsky!
The irony is Ludvik's "joke" is on him because the Communist authorities intercept it and don't appreciate it, forcing him to work in a mine. Such is the reward for Ludvik's devotion to the party. So, therefore, it's not a surprise that this book was banned after the Communist takeover of Czechoslovakia. It has a dark, even nihilistic, tone as can be noted from this quotation by Ludvik:
Everything will be forgotten and nothing will be rectified. All rectification (both vengeance and forgiveness) will be taken over by oblivion.
In light of all the previous evidence and ideas, it is important to recognize Kundera's own remarks on the subject. In 1980, someone on TV remarked that his novel was “a major indictment of Stalinism.” Kundera was really quick with a retort: “Spare me your Stalinism, please. The Joke is a love story!” This shows that Kundera meant his novel to be not just a mockery of the Cold War Era, but also a story in itself.