In general battery converts electric energy to chemical energy while capacitor converts the same into electrostatic energy to store energy. however the battery has relatively large energy capacity than a capacitor. This is what enables a battery to maintain the battery voltage longer than a capacitor.
On the other hand the chemical reactions in batteries are relatively very slow compared to the process of storing energy in a capacitor. Hence capacitors have higher current ratings than that of batteries. Moreover cost of battery with constant power rating is higher than that of a capacitor with the same power rating.
As a result in application where relatively low energy storage is require or when higher power rating is of more importance, capacitors would be utilized. Thus the decision should be taken based on intended application while considering the cost as well.