Sir David Hare's studio in Hampstead looks like the set design of a play about a famous British playwright. Artlessly glamorous and plastered in posters celebrating his theatrical successes, to critics who accuse him of being self-congratulatory it's the sort of scene that would drive them mad. What drives them even madder, of course, is how often his work hits the nail on the head. Only hours before I arrive, the high court ruled that David Miranda's detention last year had been perfectly lawful. To many, the judgment seemed inexplicable – how could the security services rightfully detain a journalist's partner under legislation designed to combat terrorism? – but the playwright could not look less surprised.

"Well, they're running the country, aren't they? I mean, the reason I'm writing about the security services is that there is no democratic control of them whatsoever. And now it seems the judiciary is joining in."

The judgment certainly appears to support the central thesis of Hare's latest trilogy of BBC films, about an MI5 agent disillusioned by his employer's rampant abuse of power. The first, Page Eight, was broadcast in 2011, and proved such a hit that the BBC asked for two more, the second of which, Turks and Caicos, will be broadcast next month. Set on the eponymous islands, it stars Bill Nighy as the British agent whose earlier discovery of the prime minister's knowledge of torture by US agents had forced him to flee the country. Hiding out on a Caribbean beach, he encounters an undercover CIA agent who is infiltrating a shady consortium of New Jersey businessmen. They have made a fortune building secret detention and torture camps for the US government but, having realised it has been royally overcharged, America wants its money back. Before long a body is fished out of the ocean, and the plot twists and turns all the way back to Downing Street.

It's uncanny timing, I say, that his portrayal of a security service out of control is being played out in court almost as we speak – but Hare isn't too surprised by that either. You only have to follow the news, he says, to realise that this sort of thing is going on all the time.

"I think my finger is on the most important thing at the moment. I'm amazed not more people are interested in what's going on in the security services, because it's so illuminating about everything. The reason this area interests me so much is that it tells us so much about politics."

Only three years ago Hare was quoted as saying that the public had lost faith in all but three institutions – the BBC, the NHS and the monarchy. Today, as far as he can see, the only institution to which we all unfailingly defer is the mysterious imperative of national security – whose exploitation by the state he regards as blackmail. "In the 70s, terrorism was much more serious, in that many more people got killed. Yet there wasn't this blackmail, when the terrorism was coming from Northern Ireland, that there is now that terrorism is coming from we know not where." And Hare is fairly sure he knows why.

"I think it's partly because government has failed. Because people no longer believe in government. The crisis in politics has coincided with the conjuring of, as it were, this universal enemy that appears to want to destroy our way of life, so there isn't a buffer any more in democracy between the security services and us. And there certainly isn't anybody in government with the guts to stand up to the security services and their effective free rein to do whatever they like. That's what these films are about – our powerlessness."

Hare is famous for the lengths he will go to research his work, and in the course of writing his espionage trilogy he interviewed a great number of British spies – many of whom, he says, are as worried about what's happening as he is.

"The arguments we're all having about the exploitation of security for doubtful purposes are going on inside MI5, too. It's not monolithic, MI5. MI5 is just like the church – it's riven by people who feel or think different things very strongly. There are people inside MI5 who think what has happened in the last 10 years is absolutely disgusting and a betrayal of what they should be doing, and a regrettable lurch into dishonourable activity. There are other people who believe that we the citizens are right to be scared of the abdication of all power to the security services – which is what's going on."

David Hare and Bill Nighy on the set of their new spy drama, Turks and Caicos. Photograph: David Appleby/BBC/Carnival

Did he learn anything in the course of his research that astonished him? Without hesitation: "Yeah." Could he elaborate? "No. I would never be trusted again." Does anything take place in his fictional trilogy that to his knowledge could not happen in real life? This time there is a long pause before he replies.

"Well, it's all happening in real life. The American security services have been ripped off for such huge sums of money, a lot of them for phantom projects that don't even exist. They've been taken to the cleaners. Apart from anything else, the war on terror has been the biggest criminal racket for the last 10 years. Because this is secret work, people have been able to charge as much as they like – and the plot is true, there have been attempts by the American government to get some of their money back, because they were swindled."

I ask if any secret agents told him that Britain had been involved in torture. This time the pause lasts even longer, and, as the silence extends, he gazes at the floor. Eventually: "I don't know MI6 as well as I know MI5. But I would be very surprised if there have not been agents for MI6 in the room while torturing was going on. I would be very, very surprised."

How on earth did he get spies to talk to him? "Well, actually," he says, beginning to chuckle, "they asked me in." It turns out that, back in 2000, MI5 invited Hare to come and give a talk about the theatre. "They have a sort of programme of getting people to talk to them who know a lot about subjects they don't know about. A lot of them are theatregoers, they like plays, so they wanted to meet me."

Hare had assumed John Le Carré's depiction of our intelligence service was wildly out of date. "I thought they're not really called Foxy and Percy any more, they don't really talk in ridiculous accents and all go to clubs. But actually, when I went in in 2000, they had toffee accents, accents from years ago, and Le Carré was entirely accurate about how public school, white, posh and archaic it all was. It was empire – it still had the feeling of empire."

How Hare approached MI5 agents more recently for research he will not say, but he wasn't surprised that they talked. "People are always keen to talk to playwrights because whatever they tell you becomes embedded in a way that is untraceable – nobody will ever know who I talked to, and they trust playwrights for that reason. So most groups you talk to are always extremely pleased to see you. They say, 'Ooh we were hoping you'd get round to us.' I keep getting emails from people saying: 'Can't you come and do us?' Particularly health and education."

Hare is good at keeping his sources confidential, but thinks he would have made a dreadful spy himself. "Terrible! Absolutely terrible. Because I don't see the world the way other people see it." I ask him to explain. "Well, certain things seem blazingly obvious to me, but when I explain them to people they look at me like I'm a complete lunatic." Only recently, for example, he was astonished to see a throwaway remark cause a great stir, and still can't understand why.

David Hare and Helena Bonham Carter during the making of Turks and Caicos. Photograph: David Appleby/BBC/Carnival

Hare told a screening audience that he thought the Scandinavian crime drama The Bridge featured too many dead bodies. "It didn't seem to me a remark worthy of the front page of national newspapers. I have no moral objection to violence, I'm just saying if you lower the bar where human life is meaningless, why should you care about any individual life, except for the very famous actor who survives? That's so obvious to me, and then suddenly it's all over the newspapers. So that's why I would not be a good spy."

He seems surprised that I'd assumed the prime minister in his latest trilogy was meant to be Tony Blair. "Oh no," he says. "We based him on Putin." This seems odd, because the plot hinges on the PM's plans for a post-Downing Street life as a super-rich international statesman, funded by private donations. The parallels, he says, are not so much with Blair as with the state of politics in general.

"Politics is just a function of business now, just a tributary of the great entrepreneurial capitalist system. And people move from politics to the private sector all the time now. Do you think David Cameron is really interested in being PM for the next 10 years? I don't think so. I think in five years' time he'll be making a fortune. He will cash in on his cachet and status as an ex-British prime minister."

He describes the current administration as "the worst government of all time", adding: "I lived through Edward Heath! And it wasn't as shambolic as this. Getting Cameron out is a patriotic duty for every citizen." Having abandoned Labour in disgust following the Iraq war, he says he will vote for them now that everyone involved in the war has gone. But when I ask who he voted for in 2010 he goes silent and looks away. He voted Lib Dem, didn't he?

"It's so shaming, isn't it? I'm so ashamed. Nicole [Farhi, the fashion designer], my wife, I've never seen her have such contempt for me. Nicole saw through them so clearly. She said: 'You are absolutely out of your head.'" How long did it take him to regret his vote? "Oh, within days," he laughs. "The rose garden broke me. The minute you saw that you just thought, 'Oh fuck.'"

What he cannot understand is what he calls "today's quietism", the absence of public rage, and he is nostalgic for the ideological clashes of the 70s. "Whereas now, the only argument we seem to be having in the United Kingdom is going on in Scotland." Hare is desperately hoping that Scotland votes yes to independence, though not out of any desire to see it go. "I think the only hope is that the Scottish argument will infect the country. The Scots are saying we don't want to be organised in this monetarist, austere, anti-public kind of government. So I do think that the argument going on in Scotland might reanimate a discussion about what kind of democracy we have down here."

For someone so angry he seems strikingly happy. He is, he agrees at once – but for a long time he wasn't. "I was absolutely miserable, until I met Nicole. But I just had the luck to meet Nicole. And that's basically made me feel as if I'm not mad." He knows lots of people say he is arrogant, but doesn't mind, because he cheerfully admits that it's true. "I don't know a good modest playwright. You have to be arrogant." He has no problem with being part of the establishment, he says, because "if I can get a film on BBC televison when zillions of people will watch it, then hurrah. I can't see any downside". But he is still, he admits, hopelessly oversensitive. I get a glimpse of what he means when I ask why he accepted a knighthood.

"If I felt that it had compromised me in any way or made me a less good or less radical writer, then sure. But it hasn't." But what was the upside?

"Oh, finally a good review, wasn't it?"

David Hare's complete Worricker trilogy will be shown at London's BFI on 1 March, and on BBC2 later next month.