Answer: The Shulchan Aruch (OC 581:1) writes that one should say selichos at the break of dawn. The Magen Avraham (565:5; 581:1) and Mishna Berura (565:12) write that the end of the night is an auspicious time for selichos. Thus one shouldn’t recite selichos before chatzos, midnight, for Kabbalistic reasons.
R’ Ovadia Yosef (Yechave Daas 1:46) quotes the Chida (Birkei Yosef OC 581:1) who explains that this time is one of din¸ judgement, rather than rachamim, mercy. This is so important, that if one is present when others are saying selichos at this time, they shouldn’t participate. According to the Chida (ibid.) and Ben Ish Chai (Rav Pealim 2:OC:2) it would be better not to say selichos at all than to say it at this time of night (See Mateh Ephraim 581:20). While there are poskim who write that we follow the timing of chatzos in Yerushalayim which would allow those West of Eretz Yisrael to say selichos earlier, R’ Ovadia says that we follow other poskim who disagree with this.
Nonetheless, the Aruch Hashulchan (OC 581:4) notes that nowadays it is common for people not to recite selichos until much later when it is already properly light outside.
R’ Moshe Feinstein (Igros Moshe OC 2:105) acknowledges that the ideal time to recite selichos is after chatzos though writes that there is no mention of this throughout the Gemara. Thus, one who won’t be able to recite selichos early in the morning may do so at night, though should preferably do so after the 10th halachic hour or 2 hours before chatzos as the Shulchan Aruch (OC 1:2) writes that this is also an auspicious time (See Mishmeres Shalom 41:4).
In conclusion, the ideal time to recite selichos is between dawn and shacharis. While sefardim should avoid reciting selichos early at night, ashkenazim who find it too difficult to do so may do so, ideally after the 10th halachic hour.