Please fill out the info requested in https://retropie.org.uk/forum/topic/3/read-this-first.
The controller configuration(s) for RetroArch is generated when you run through the Configure Input steps in EmulationStation. A auto-configuration profile (a .cfg file) is generated and placed in /opt/retropie/configs/all/retroarch-joypads - you can check if the profile file is there after you've run the EmulationStation input configuration steps. It's named similarly to your gamepad/controller's name.
However, if you have disabled the joystick auto-configuration - from RetroPie-Setup - the gamepad profile file will no longer be generated. Other cause could be the resettting/change of the RetroArch configuration from RetroPIe defaults, which may change the paths where the emulator looks for controller configuration profiles.