let us consider the basic process:
we first bring one sphere (could be +vely or -vely charged) from infinity where the potential energy is assumed to be zero.As there is no other charge present from before thus the force on the sphere we r bringing in would be zero hence work done by external agent would be zero i.e potential energy would be zero.
now we bring in the second sphere which is oppositely charged. this sphere will be attracted by the sphere present from before. as we bring IN the second sphere from infinity thus the work done by electric field would be positive ( as the attraction is natural) hence the work done by external agent would be -ve
i.e potential energy would be -ve
thus total P.E = 0+(-ve value)= -ve value