Pepper Spray is currently in use by some police forces - it is believed to be more effective than CS Spray.
When it can be used is a very open question. Police Officers are legally allowed to carry/use it. The use of it would be deemed a "use of force" and would have to be justified and proportionate dependent on what they are doing (in the same way that batons/handcuffs/palm strikes/knee strikes etc are used).
Police Officers have various powers and can often use force in order to use one of those powers - examples include arrest, stop & search, entry to buildings to prevent loss of life.
It is far easier to look at individual cases and say whether the use is/could be deemed to be appropriate or lawful rather than giving huge generalisations.
If you could be more precise it would be easier to answer.
Hope this helps.