For machines that were upgraded from a previous version of Windows you should be able to do this:
Search "default programs" in the search feature, click "set your default programs", find "Windows Photo Viewer" on the left (I believe this is the application you are talking about as the Windows 7 photo viewer), click on it, then click "Set this program as default."
Open a picture and it should open up in the Windows Photo Viewer.
If the machine has Windows 10 installed from scratch, you can try this article and follow the instructions under the "If you installed Windows 10 from scratch" section.
Basically, you will have to copy the registry code from this post by Edwin into notepad and save the file as a .reg
. Save it in a place where you can find it! After that, open the newly made .reg
file to merge it with your Registry (more dialogue boxes may appear to do this). Then you should be able to follow the steps above for setting the default programs.