I chose this century to ask this question since electricity wasn't manipulated to the extent of the 19th or 20th centuries. So I wonder, were people hoping for a perfect utopia in the future, or something else entirely?
Despite the title, this earlier answer of mine talks about 18th century views of the future in the last half/third/ish!
You can read all of Louis Sebastien-Mercier's L'An 2440 (1771) in English on Google Books, too, if you're interested. Well, "The Year Two-Thousand Five Hundred," because, and I quote:
The title of this work in the original is The Year Two Thousand Four Hundred and Forty; but as there appears no reason for fixing to any particular year, we have for the sake of a round number, called it The Year Two Thousand Five Hundred.
Well then!