Godot have from default input map some joystick input. For example uiaccept to Return, Enter, Space and Device 0, Button 0. uileft , uiright and etc.
Those actions are automatically used for ui (user interface).
So if you grab focus for a button with the method .grabfocus you can point the button which is going to be highlighted in your menu. Afterwards int the inspector tab of the Button you can assign other buttons as neighbors. Up, down, left and right neighbors. Those are the buttons which are going to grab focus when you use the default ui input map.
Also if you use containers, those containers are going to take care of those neighbors. For example you do not have to manually set up the neighbors in a grid_container.