I think we're all agreed that it does not stop the power, however the area of effect should be modified. Exactly how you modify the area of effect is DM choice I think.
In terms of the ordering of actions in this case, since the attack of opportunity is provoked by the attack, that should mean that you have to decide to use it or not when the DM declares the area of the attack, not when he rolls the dice. (Since all the attack rolls are conceptually simultaneous)

In terms of the ordering of actions in this case, since the attack of opportunity is provoked by the attack, that should mean that you have to decide to use it or not when the DM declares the area of the attack, not when he rolls the dice. (Since all the attack rolls are conceptually simultaneous)
- DM decides to use power
- DM declares the area of effect
- Opportunity to use divine castigation now
- May need to reposition area of effect (if AOO used)
- Make attack rolls and subsequent damage/effects