The federal judge overseeing the bankruptcy of Stockton, Calif., ruled that the city has the power to cut its pension obligations, a landmark decision that has implications for workers, investors and troubled municipalities across the country.

U.S. Bankruptcy Judge Christopher Klein ruled Wednesday bankruptcy laws give Stockton the power to cut ties with California Public Employees' Retirement System, or Calpers, which controls city workers' retirement money as the country's largest public pension fund. Judge Klein said that...