The author of this prayer was Reinhold Niebuhr. The prayer was widely used in sermons in the 1930's and 40's and was first published in 1951.
The Serenity Prayer was spoken a lot in my family. I can still hear my mom quoting this prayer. I can't recall when she began reciting the words. It could have been while she was trying to cope with the many difficulties in her life. It may have been when my brother entered the 12 step program due to his alcoholism. I am not sure of its origin in her life. Regardless of when she began to say this prayer the words seemed to give her comfort.
I think it can give those of us going through a separation and divorce comfort as well. It is a simple prayer but contains a depth of truth and faith. God can give us the serenity to accept the things we can't change. God can give us the courage and strength to change what we need to change. God can give us the wisdom to take the right path. I think what we have to do is put our faith and trust in Him and His timing. This act of complete trust is many times easier said than done, but we can do it with God's help.