A British man has been charged with hacking into the computer systems of the US army, Nasa and other federal agencies.