Should you worry about your precious photos degrading over time. Yes and no. The digital data, by itself won't degrade over time. But, like photographic prints or old negatives can, the physical medium that you use to store your photos could fail. Additional, in the long term, the technology can change so much that it can be challenging to retrieve old photos.
Old CDs, DVDs, and Blu-Ray disks will deteriorate over time. Computer hard drives and flash drives can become corrupted and crash. The older storage systems that were used in the 1990s, were tape drives, zip drives, and jaz drives are long gone. Old systems like these eventually become incompatible with modern storage systems.
When they're saved photos are usually saved in a format known as a jpg such as your-photo.jpg. It'a popular format because it compresses the information into a smaller file size. This benefits you by not filling up so much of your memory storage.
The problem is that whenever a file is adjusted or edited in any way, each time it's saved as a compressed file. The quality will be reduced. Each time it's done is another generation away from the original, highest quality image file. See the example below of image quality loss.
Time, all by itself, does not automatically cause a deterioration in image quality. Repeated savings of edited images or saving at lesser image quality settings can have a harmful effect on photo quality.
For advanced photographers who use Photoshop, there are options to save a photos in non-compressing formats that don't reduce quality, even after editing. These include TIFF and PSD files, which are much much bigger in file size. There's also the option to use the "universal" DNG (Digital Negative) format, but that's a topic for another day.
Photos will not inherently degrade on your computer over time. The biggest risk to losing your photos comes if the hardware is damaged, corrupted or completely crashes. Online photos are essentially stored on computers, called servers, and don't degrade unless there is a complete crash of the system and networked computers are all affected.
All reliable photo backup service providers have multiple backups and safeguards built into their systems.
The good news is that you only have to stay somewhat current with your storage options of your photographs. If you are backing up locally-using your own disks-you will want to refresh your system and update to a relatively current technology every so often.
Because the market for photo storage and other data is so big, there's plenty of demand and that will insure that your online options will be plentiful.
Just the act of opening a digital photo file will not degrade its quality. Just the passing of time alone will not affect the quality of a photo either. It's when a change is made to a photo and saved that you need to pay attention to quality issues.
I'll also suggest visiting one of the topics below to gain a better understanding your options for preserving your photos with a photo backup system that makes sense for you.
Keep shooting. Keep learning. Keep improving.