Two similar charges are stable when they are far away, but when they are brought closer, they become unstable due to increase in potential energy (+ve)
But when two unlike charges are brought closer, the potential energy decreases (-ve) and they become stable.