The mantra used to be ‘don’t upgrade if you don’t have any problems’. This applied to software updates, hardware firmware and operating systems.
Unfortunately, the world has changed. Many/most updates to software are to fix security holes, and as soon as the update is released there are black hats working to see what it fixed and then find victims before they have installed the update.
If you have a MicroTik router, for instance, by default they are open to logging in from the Internet. Researchers discovered several months ago that there was a way for hackers to get past the routers’ security, gaining access to all your traffic and being able to use your devices as part of botnets. The researchers notified the company, and it issued a patch - but owners have to download the patch manually. Many devices remain unpatched.
As for whether to stay with Windows 7 or 8.1, that is something for the individual user to decide. Windows 7 would apparently not be a good choice, as mainstream support for it has ended in 2015 (refer below for ‘mainstream’ vs. ‘extended’ support). Windows 8.1 mainstream support ended in January of 2018.
What this really means to Windows 8.1 users is unclear to me, as I upgraded to Windows 10 some time ago. If you still get security patches, then you should still be fine using Windows 8.1. Make sure your browser has Adobe Flash disabled (and preferably remove it from your computer), and if you have Adobe Acrobat make sure it is kept up-to-date (the latest update apparently fixed dozens of ‘critical’ security vulnerabilities). Foxit apparently also has a lot of vulnerabilities patched in its latest update.
Of course, the way Microsoft describes its ongoing support for Windows versions is incredibly confusing. That said, it does have a fact sheet about it that may be handy. You will probably also require this table to translate what ‘mainstream’ and ‘extended’ support actually mean.
In summary, it appears that Windows 7 will continue to get security updates until January 2020, while Windows 8.1 will continue to receive security updates until January 2023. Neither will get ‘quality of life’ updates in future.
I would recommend upgrading to Windows 10, which is constantly being improved, unless you have specific software that is not supported by it.