In the United States, elements of punk rock have strong right-wing links, but in West Germany, punk rock seems to have been almost universally left-wing. Is that an incorrect perception? If it is correct, why was it a left-wing phenomenon?
Serious question to get some clarification: What punk are you listening to that you consider “right-wing”? I’m curious because most punk bands - that I’m familiar with, anyway - tend to have more socialist liberal leanings. Anti-capitalism, anti-conformity, and distrust of government are common themes in punk, particularly in the hard-core scene. As with most genres, there are many layers to punk. Proto-punk bands like MC5 and the Stooges (both from the Detroit area) were fairly subversive, with Iggy Pop cutting himself on stage, but were not overtly political; the MC5 were very much more politically charged, albeit with less shock value, embracing the counter-cultural movement, going so far as to aligning themselves with the Black Panthers.
As punk began to gel as a distinct genre, you had very distinctive pockets which had different value systems. For example, New York hard core was very nihilistic, often violent (the Cro-Mags were essentially a street gang that played music) but were not terribly political outside of perhaps anarchy, with Reagan Youth exemplifying the anarchy-punk movement. The Ramones were arguably the first of the noteworthy punk bands, and Joey Ramone would often wear Nazi regalia on stage; however, the only statement he was making was thumbing his nose at the older generation and for shock value (he himself was Jewish), but it is perhaps worth noting that Johnny Ramone was a staunch conservative. Southern California was more about being outcast and clustering together with a more party-like attitude, but you still had bands like Circle Jerks and Bad Religion infusing political elements on their songs, Up in the Bay Area you had Dead Kennedys who were intensely political, anti-authoritarian, and perhaps one of the most politically active bands of the era, even with Jello Biafra gaining a healthy share of votes for mayor of San Francisco. And then in the DC hardcore scene it was nearly all politics and social issues, with bands like Bad Brains, Minor Threat, Fugazi, and pretty much all the early bands on Dischord Records.
The early punk bands in the seventies were largely a rejection of status quo and laissez-faire attitudes, as well as the encroaching urban decay and white flight that fostered a sense of hopelessness and isolation, as well as a rebuke of what they saw as bloated, over-produced prom rock and saccharine AM radio, not to mention disco. As Reagan took office, they had a now new enemy as they saw Reagan as a fascist puppet of hard-line ultra-religious conservatives, and punk as a whole began to take on more political themes, but always very far-left leaning.
Ultimately, punk was largely about freedom, outcasts, and community, and effecting change to allow people to think for and be themselves. Individual liberty, I suppose, was their ultimate goal. The same holds true for punk in general, notably in the UK (The Clash, Crass, Subhumans), and around the world.
I’m afraid I don’t know to much German punk, but I am a HUGE fan of Krautrock. Krautrock in and of itself attempts to avoid politics altogether, but it’s importance lies in the fact it was the first “original” music style to come out of Germany since perhaps the Classical era. While the bands don’t show a very cohesive style - each band is decidedly unique - it was an attempt to move past the Nazi era and reestablish (or perhaps reinforce) the fact that they were a country and culture worth appreciating. Perhaps ironically, the movement began with a group formed by ex-US Army soldiers who decided to stay behind, forming a band called The Monks, which themselves could also be considered proto-punk, but might be better labeled as acid pop folk, if that’s even a thing,
Then, of course, came the Berlin Wall, dividing east and west Germany, with the west enjoying all the luxuries of a growing economy, and the east under the USSR. As they became reunited in 1990, the opening of the west offered unmitigated exposure to this style of music and, just as American punk bands voiced their outrage over a government that they felt sought to silence them and exist in a state of conformity with no questions being asked, it’s only natural for Germans - who still carry the stigma of the Nazi regime - exercise their chance to make their own voices heard and express their own freedom through, well...punk rock.
Edit: grammar and spelling, and added a bit to more answer OP’s question with regards to punk in Germany.
I think German punk rock tends to be very political, arguably more so than in other countries. This can be connected to a) a desire to break with country's nazi past and present, more esp. b) to confront the growing "neo-nazi" movement of the 90s onwards, and c) connections to the strong German anti-fascist movements. These are clearly connected, let's try and look at them chronologically.
Just a note: of course "left wing" can have very different current even just in Germany; and often what is considered "left" in the US can be more to the middle of the political spectrum in European countries. I'll take "left" in a broad sense here, and look at political - esp. anti fascist - messages in German punk.
Keine Macht für Niemand!
Music wise, Krautrock is often seen as German music’s “ground zero” after WWII. While it encompassed many styles and genres, a common idea was to break away from the parent generation’s nazi past – keep in mind that even into the 70s at least, former nazi officials continued to hold high posts in law, education etc. This break for bands like Can and Neu! meant also overcoming earlier musical influences from Germany, but also from US rock.
/u/jigga19 's great post mentioned this already (which seems to deal with everything except German punk ;), but I have not come across much direct overlap between krautrock and German punk. Many earlier groups would rather go into more pop oriented fields (Michael Rother of Neu!), further out to electronics (e.g. Cluster), or influence the New Wave inspired “Neue Deutsche Welle” (producer Conny Plank).
Still I think it’s important to keep this lineage of German underground music in mind here, and there’s a good amount of “proto-punk” to be found in tracks like Neu!’s “Hero” – which actually influenced early British punk via Brian Eno and Bowie. There’s also the highly influential Tone Steine Scherben (sometimes filed under Proto-Punk as well). Famous paroles of theirs include “Macht kaputt, was euch kaputt macht” ("Destroy what destroys you") and "Keine Macht für Niemand!" (with a major anarchist bent), and they had strong ties to squatter scenes in Berlin. The more direct musical influence comes from US and UK punk though, which was adapted over time.
Coming back to politics, Melanie Eis and Fabian Eckert argue that early German punk in the 70s and 80s explicitly distanced itself from leftist West German folk and rock: they wanted to break from the views and influences of the “Hippies” of 68, which German punks saw as too moralizing and, simply, too boring:
Since the left had already occupied nonconformist positions, punks felt they could only express their repudiation of both middle class and political left through irony. Thus, West German punk’s aesthetic might have drawn upon British and American predecessor, but punks also transferred their examples’ aesthetics to express their own departure from a moralizing West German Holocaust discourse. … German punk revealed what they feld everyday Germans still tried to ignore: A majority of Germans had been, to various degrees, Nazi perpetrators.
This attitude could lead to problematic elements, like an insensitivity to Holocaust survivors (e.g. by “ironically" using nazi symbols). Eis/Eckert see here “a reaction against, but paradoxically also sometimes a continuations of the narratives that had determined the political left’s Holocaust commemorations and discussion." More generally, we can note here the complex distancing from the earlier leftist movements by punks; and also a desire to distance themselves from German past and nationality, often in an ironic way.
Probably the most influential of the 1st wave of German punk bands was Slime, founded in ’79. They’re also a great example for your question: many of their songs show both highly influential anti-fascist messages, and anti-American as well as anti-German slogans. Famously, their first EP Wir wollen keine Bullenschweine ("We don't want any f*ing cops") was the subject of proceedings by the public prosecutor in Hamburg. Their song “Polizei SA/SS“ clearly equated West German and nazi police, and was to be censored. An argument brought against the band was that they practiced “Verunglimpfung des Staates und seiner Symbole”, so roughly a denigration/slander of the German state.
Theses processes should be understood before the very charged political atmosphere tied to the radical left, anti state terrorism by the RAF at the time. For our purposes, I’d highlight again the anti fascist and anti German influence by Slime on later “Deutschpunk”, and on the German antifascist movement.
Mein Skateboard ist wichtiger als Deutschland
Of course even the early German punk scene was more heterogenous than this. The two arguably best known bands until today, Die Toten Hosen and Die Ärzte, both developed a more “fun punk” kind of style. They had a big influence on commercialising German punk and bringing it to the charts. With the fall of the Iron Curtain the punk scenes of East and West Germany increasingly came together, leading to the development of Deutschpunk: described as a particularly raw sound and radical political lyrics (maybe what you were thinking of...).
At the same time, punk increasingly addressed not only earlier fascism but also the growing right wing or neo-nazi scenes in 90s Germany. These bands felt that major neo-nazi progroms, like those carried out against immigrant homes, were not addressed sufficiently by German politicians. Plus mostly skinhead-originated nazis would clash with leftist punks. As a side note: as in other countries, afaik there were/are also problems in German punk with rightwing groups connected to skinhead scenes – so I’d be careful to describe it as only “left wing”.
Interestingly, most groups including mainstream punk bands like the mentioned Ärzte usually have anti-fascist songs. That band’s chart song “Schrei nach Liebe” includes the well-known line addressed to a neo nazi “your violence is only a silent cry for love”. This is a far cry from other more radical anti-fascist groups, but clearly shows how a) Deutschpunk went mainstream b) while retaining and even extending the earlier anti fascist messages. At the same time, it’s very possible to push an anti-rightwing/anti-fascist message but devoid of any strong left politics (NB not just in music but also in contemporary politics).
In the 90s the legendary Slime briefly reunited, and more underground new bands like WIZO or Terrorgruppe came up. These were clearly influenced and Slime and similar bands, but also set similar messages to a poppier sound (Terrorgruppe like to call their music “agitpop”). I can say from seeing Terrorgruppe live that it’s poppy on record, but theirs was one of the more violent (and fun) concerts I’ve seen. This time around, mostly 90s US punk bands (like Green Day, Rancid or NOFX) provided musical inspiration that was adapted into a new sound.
For these band I’d again highlight the strong connections to anti-fascist movements, especially the German Antifa. The German leftist movements are pretty complicated (and go beyond my horizon), but one current in the Antifa is a clearly anti German message tied to anarchist ideas: either against the government or more usually against the state.
We’ve already seen this with Slime; are more pop-oriented take is evident in Terrorgruppe’s “Mein Skateboard ist wichtiger als Deutschland”. Ostensibly a fun pro skating song, it also says that the singer’s skateboard is more important than Germany (anti German), and continues to see an influence of earlier fascism – the lyrics have passers-by wishing that the skating protagonist should go to a KZ. Humour coupled with strong political messages, messages that hark back to the first German punk groups, and draw faint echoes to krautrock’s “music without a past”.
In case you'd like to read more on this, I liked the article by Melanie Eis and Fabian Eckert, "Holocaust, West German Memory Culture, and Punk's Intervention into the Everyday" in Beyond No Future: Cultures of German Punk, which goes into much more detail on the memory aspects of this than I could.