How could G-d, who is the very essence of good, issue a curse? Are we not taught that "no evil thing issues from Above?"
In truth, however, G-d does not issue curses at all, and only blessings are "issued from Above". The problem lies "below" in our ability to receive G-d's blessings. If a person is not a fitting receptacle for the goodness which G-d bestows upon him, he will simply be unable to accommodate G-d's blessings. The result will be that after its downward path through the spiritual worlds, the blessing is received in a way that appears, to our human eyes, as a curse.
As least that is how it appears in the spiritually dampened moments of exile. Thus Onkelos, who authored his work amidst the Babylonian exile, interpreted the word קללה as "curse". However, Targum Yonason wrote his commentary in the Land of Israel during Temple times, when even the average person could easily appreciate that "no evil thing is issued from Above". Thus he rendered קללה as חילופּא - "substitute" - indicating that G-d Himself only issues blessings, but His blessings may later become "substituted" by something else.
And this also explains why, in the Messianic Era, we will not only forgive G-d for the sufferings of exile, but we will thank Him [See Isaiah 12:1 ] for then it will be evident how even G-d's "curses" were in fact blessings in disguise.
Source: Likutei Sichos Lubavitcher Rebbe