To elaborate on Jon Custer's comment: yes, for protecting the display against burn-in, a black screen would do just as well or better as any "screensaver". However, the graphical effects displayed by screensavers had two important purposes:
They showed that the computer was turned on and functional.
They looked nice.
Purpose #1 one used to be a lot more important than one might assume from a modern perspective, in large part because up until the mid-to-late 90s most computers had a mechanical power switch with no software protection.
Thus, if you walked up to a computer that you assumed was turned off (because the screen was dark) and pressed the power button to turn it on, you would instead turn the computer off immediately, potentially losing any unsaved work.
There would be no popup asking you whether you really wanted to turn off power, and indeed typically no way for the OS to even perform a controlled shutdown. The button would just turn off the PSU, leaving the CPU and the disk drives etc. with no power, and down the system went.
In the worst case, turning the computer off at the wrong moment could even lead to data corruption, if you happened to interrupt some critical operation such as disk defragmentation — which, coincidentally, was also a fairly common long-running process that you might well start up and then leave running while you went to grab a coffee, or maybe even overnight.
Even when the ability for the OS to intercept the power button press was added (precisely because accidental power-off was such a common and potentially destructive mistake), holding the button down for a second or two would typically override it and force a hard power-off (because there was still a need for a way to be able to turn off and reboot the computer even if it got completely frozen and unresponsive, which was unfortunately all too common). Coincidentally, if the screen was completely turned off and in power save mode, it might take a second or two to turn back on…
Having a graphical screensaver running was an easy way to prevent these kinds of mistakes, simply by immediately and intuitively showing anyone who intended to use the computer that it was already running, and that they should keep their fingers off the power button.
Of course, purpose #2 should also not be neglected. Screensavers were simply cute, and often showcased the graphics capabilities of the computer (such as they were, at least). Many people would download and install fancy custom screensavers just to personalize their computer or to show off what it could do.
(Indeed, some of those "screensavers" wouldn't even do anything to protect the screen from burn-in, and could even contribute to it by displaying static background images or e.g. a repeating slideshow with no change to the image positions on the screen. But often it wasn't a big problem anyway — as time went on and display technology advanced, actual burn-in became less and less of a risk.)
Computer and OS manufacturers would also use fancy screensavers to showcase their products, particularly since computer stores would often have demo computers running for customers to try out, and naturally those computers would spend a lot of their time idle and showing a screensaver. I'm sure the Flurry screensaver on OSX, for example, got Apple a bunch of sales in the early 2000s just by looking a lot fancier on the store shelf than anything likely to come preinstalled on a Windows box at the time.