**1. When can a permanent deacon not preside at a wedding in and/or outside the Catholic Church? **
In the Catholic Church:
Can. 1111 §1. As long as they hold office validly, the local ordinary and the pastor can delegate to priests and deacons the faculty, even a general one, of assisting at marriages within the limits of their territory.
§2. To be valid, the delegation of the faculty to assist at marriages must be given to specific persons expressly.
If it concerns special delegation, it must be given for a specific marriage; if it concerns general delegation, it must be given in writing.
Can. 1112 §1. Where there is a lack of priests and deacons, the diocesan bishop can delegate lay persons to assist at marriages, with the previous favorable vote of the conference of bishops and after he has obtained the permission of the Holy See.
§2. A suitable lay person is to be selected, who is capable of giving instruction to those preparing to be married and able to perform the matrimonial liturgy properly.
Outside the Catholic Church:
I have no idea what you would mean by this. A deacon may not witness a marriage “outside the Catholic Church”.
2. Is there a time when a permanent deacon can but should not preside at a wedding in the Catholic Church?
When he does not have faculties to do so, see above.