For PS3 Controller simply plug in the controller via USB-cable to the system Batocera runs on, wait for about 10 seconds, then unplug the cable and press the PS-Button in the middle of the controller.
The controller buttons should be preconfigured and work directly out-of-the-box.
For PS4 Controller it is a bit more complicated:
First plugin a keyboard to the system Batocera runs on and navigate to "Controller Setup" (or use the PS3-controller you connected before, to navigate).
Then on PS4 controller press the PS-Button (the button in the middle between the 2 analog sticks), and while the controller is blinking, press the small reset button on the back of the controller (with a toothpick for example).
After that press and hold PS + SHARE button at the same time until the controller light is blinking very fast.
Then with your keyboard (or already connected PS3-Controller) go to "Pair A Bluetooth Controller" and after a few seconds the controller should connect automatically.
After it is connected you maybe have to configure the buttons of the PS4-Controller. Navigate with your keyboard to "Configure A Controller" and follow the instructions shown.
For Switch Pro Controller i do not know, because i do not own one. Someone else has to answer, how to connect it via bluetooth.
I always prefer and recommend PS3-Controllers, because it is totally easy to connect and the button-mapping is preconfigued and works plug'n'play (or plug for 10seconds, unplug, and play to be correct) 🙂