I assume that:
1. [Name] is unique in both tables.
2. [Id] doesn't have any constraints, i.e. can be UPDATEd.
3. You won't run this on a production, because the code is off the top of my head, I didn't test it in any way.
SET ID = (SELECT ID FROM Table1 WHERE Table1.Name = Table2.Name)