Jonathan Edwards wrote and delivered his famous sermon during the Enlightenment period. Scientifically this was a great period. Lots of great scientific minds were adding a large amount of content to the breadth of scientific knowledge. Consequently, many people began wavering in their faith and devotion to God. A large portion of New Englanders were Puritans or descendants of the original Puritans. As a way to combat the waning faith, a religious revival began happening during this time as well. It became known as the Great Awakening. Jonathan Edwards gave his sermon during that period.
His intended audience is probably two-fold. First, he knows that he is speaking to still faithfully strong Puritans. His fire and brimstone sermon served to keep those believers on the straight and narrow. His second audience would be those Puritans who had wandered from the faith and had become uncertain of God's place in their lives. A possible third audience would be people who had never accepted God as their savior in the first place. It wouldn't have mattered, because the verbiage of the sermon is addressed to both of those people, who are "hanging over the pit of hell."
The effect of Edward's sermon was as intended. It made people fearful of an eternity in Hell and brought people back to the faith. Edward's sermon didn't do this all by itself, though. The entire Great Awaking served this function. Edwards just played a part.
Johnathan Edwards lived during the Great Awakening, a time during which there was a significant increase in religious fervor. He used imagery in order to scare the audience into doing what he wanted to do. Because people were mainly Puritan during that time period, he wrote in such a way that the Puritan people could make sure stayed faithful to God. He did this quite successfully. More people began to realize the seriousness of any sins that they commit, and they sought salvation from any punishments.