cfg stands for ‘configuration’ and the files that hold RetroArch’s settings are stored in that format, which is really just plaintext. We have retroarch.cfg to store the frontend options and retroarch-core-options.cfg to store the core options.
cgp and glslp stand for Cg Preset and GLSL Preset, respectively. They’re shader presets that tell RetroArch which shaders to load in a multipass situation, as well as a bunch of metadata those shaders may need to function properly, like whether to use bilinear or nearest neighbor scaling, any hardcoded scale factors, etc.