Magneto spends the better part of the X-Men trilogy trying to exterminate all human life on earth, being imprisoned and subsequently killing his way out. Afterwards, why was he left free to roam sunny parks playing chess against himself? Is it because he is (temporarily?) powerless, and so he is now acquitted?
I assume that because he no longer has powers (and is no longer a mutant) they see him as no threat. The main idea of prison is to rehabilitate criminals so they can be released back into society safely. Magneto losing his powers was his rehabilitation as such.
I assume the authorities think that Magneto's power loss is permanent so he will no longer want mutants to take over the world and it's safe to have him in society.
It's like losing his powers is punishment enough for all the crimes he committed. At the end of the day it is Marvel so they mightn't want to appear to punish Magneto even further.
There's also the US constitution to consider. The 3rd movie made clear that mutants were now recognized by the government and receiving representation on the president's cabinet.
With these rights, Magneto's treatment before and during the events of X2 were illegal, and likely received much outrage when brought to light at the end of X2. The third film also discusses the morality of a 'cure', and the use of the 'cure' in weaponized form. This could also be a major legal/political issue, and likely angered a large portion of the mutant community.
With a president that is supportive of mutant rights, and as it could be believed that the 'cure' was final, it's possible that the government either pardoned or decided not to prosecute a now-broken old man who is believed to no longer be capable of posing a threat.