The relationship of the United States to an illegal alien who commits a crime is wholly dependent on our treaty obligations to the nation of the alien's citizenship. An alien has no rights here other than stipulated by treaty. This is why, likewise, a US consulate is often able to rescue an American from punishment in foreign lands where our citizens have inadvertently fallen afoul of the law.
Aliens have rights here as "persons," as opposed to the more strictly defined "citizens."