CP is the main currency for events. The main use of CP is trading for event chests, which give weapons, and tier III (SR) weapon and ability scrolls, which cost 1500 CP each (250 the first time). Starting from the Final Fantasy VII main event, tier III (SR) summon scrolls became available for the same price as well.
But that's not all CP is for. In the main part of most events, there is a CP ranking in addition to normal points rankings. CP ranking is on an individual basis only. The main part of each event, usually with a two week duration, give out rewards based on CP rankings, once during the middle (ie, after one week), and again at the end. The rewards are different each time and each event, but are usually contain extremely powerful weapons and summons, special backgrounds, weapon and ability scrolls, and large quantities of transmutation items.
Ranking division is usually 1-10, 11-100, 101-500, 501-1000, 1001-2000, 2001-4000, 4001-7000, and 7001-10,000. 1-10 will usually get SR+ weapons, enough to limit boost to full; 11-100 will get SR+ weapons and some SR, enough to limit boost to full with some effort; and 101-500 will usually get some SR items. It is usually not possible to get all varieties of weapons without being in the top 100, and often not any weapon at all without being in the top 500. Scroll and transmutation item rewards also scale by rank.
CP is obtained by fighting in brigade battles, and the amount depends almost entirely on damage dealt. From the Final Fantasy VI event on, CP is earned for all brigade battles, whether event boss, esper, or fiend.
When the player fight in a brigade battle, immediately after they attack, they get CP equal to around 1% of the damage they dealt. When that enemy is defeated - if it is - they get a CP bonus of around 9% of the damage they dealt to a brigade boss, and around 6% for espers.