The question was asked, “When is the prayer of consecration to the Divine Heart of God the Father said?” The answer is at any time. Whenever you wish to say the prayer, do so. No rules and regulations are involved although some say it daily as, like that, you are offering your day to the Father.
Meanwhile, for those who believe in the Sacrament of Reconciliation (e.g., Catholics, Orthodox), it is wise to sometimes say the prayer after confession, since the consecration leads to receiving the seal of the Father (Rv 3:10-12).