Federal law provides that U.S. citizens who leave the United States for a foreign country are permitted to continue voting absentee. But, if they move to Puerto Rico, U.S. Virgin Islands, or Guam, they lose their right to vote.
Oddly enough, though, if such U.S. citzens move to the Northern Mariana Islands, which is also a U.S. possession, they may continue to vote.
On September 15, the Seventh Circuit heard arguments in Segovia v USA, 16-4240. The plaintiffs are U.S. citizens who formerly lived in Illinois and then moved to either Puerto Rico, Guam, or the U.S. Virgin Islands. They challenge their inability to vote. They argue that because similarly-situated persons who move to the Northern Marianas are permitted to vote, they are being denied equal protection. See this story about the hearing. The three judges are Daniel Manion (a Reagan appointee), Ilana Rovner (a Bush Sr. appointee), and David Hamilton (an Obama appointee).
Here is a link to the oral argument.