How to confirm Finder's rename prompt using the keyboard?

Press Ctrl+F7 to enable all controls for Tab key and use it to switch the active button in application dialogs.

This can also be set in System Preferences -> Keyboard -> Shortcuts.

enter image description here