When trying to find a background story or history for the Rings in the Sonic series, it's important to know that they originate from a time where most game elements were added to games because they were considered an expected staple rather than to tell a story.
As others have mentioned, there probably isn't any real (original) background story for them and for me this isn't really surprising.
Back then background stories were just there to set the mood or describe the setting overall. The world or "universe" of most games of the time could be explained in a sentence or two. Instead, the goal for players was to earn a high-score to compete with others and provide motivation to play again.
The original origin of (home) video games are arcade machines, where players originally had to pay money to be able to play them. This "credits" approach was implemented by games typically offering you a limited amount of tries (speak: continues or extra lives).
Even back then developers learned to add free possibilities for players to stay in the game. This would not only give them extra motivation to replay and improve, but it would also be an excellent excuse for their whole business concept (to literally "nickle-and-dime" their customers). "You don't have to pay extra, just be good!" even works in today's Free-to-Play economy.
For this approach, they needed some other element. Either hidden extra lives (which had to be very rare) or some more common, but far less worthwhile collectible pick-up: coins, rings, and similar elements.
First console games for homes carried over all these concepts, even if the games weren't direct ports (Super Mario Bros compared to Donkey Kong for example). Players simply expected that (or were taught to expect them).
As such pretty much all games of that time feature typically all or most of these concepts:
- Points system (possibly with a high-score table)
- Extra lives/continues
- Rare collectibles to obtain more lives
- Common collectibles to earn more score and eventually obtain lives
But let's get back on topic for the rings in Sonic:
Why are the rings there?
It's probably not more than that: To provide the players with a pickup to earn points and extra lives.
Why are they rings and not coins?
Guess nobody has the exact answer, but I'm really tempted to blame Nintendo: At the time they were very protective of their IPs and ideas, even more so than today. While Giana Sisters was a far more direct clone of Super Mario Bros, I'd assume Sega took all possible precautions to differentiate their game from SMB without alienating potential players by striving too far from the known formula. Put holes in your coins and you get rings. It's simple as that.
Rings also protect the player from getting killed, similar to how Mario can collect pickups. The mechanics are different, but again I think they simply needed a readily accessible way to keep the player from getting killed too often without throwing power-ups on every second screen. Remember that the core concept of early Sonic games is essentially an anti-pattern: You're supposed to run as fast as possible, but then again the game punishes you, by giving you possibilities to run into spikes, enemies, and other traps (which clearly is part of the game concept). Most Mario levels are designed differently, so they just needed a different power-up approach and the rings probably gave them exactly that.