Search engines are advanced enough to find and index images but they still need help determining what the image is. Eventually search engines will be able to scan an image and determine what it is but we aren't there quite yet. As of right now they need us to tell them what our images are so they can index them into image search for related keywords.
There are a few reasons search engines give boosts to websites that user proper image names and alt tags. The first is that it helps them understand what the image is so they can put it into their image index and other searchers can find it. The other reason search engines reward websites that optimize images is accessibility. Search engines want your content to be accessible to as many people as possible and will reward those who help them with that goal. If you optimize your images correctly it helps the blind and users with text‐only browsers understand what the image so they can get a more complete idea of the page.
Let's say you wrote an article called "Dog Training Techniques" and you have images of all the types of dogs that the particular methods work for. If your images are automatically named something like image1.jpg or postimage2123.jpg it doesn't tell us what the image is about at all. A better and more user‐friendly alternative for a picture of a golden retriever would be golden‐retriever.jpg or goldenretriever‐puppy.jpg. That way both search engines and visually impaired people know what the image is supposed to be even if they can't see it. It might sound like common sense, but give your images accurate names and search engines will reward you.
Note: Use hyphens in your image names to separate words instead of underscores, they're easier for search engines to understand.
The other major image attribute search engines use as a ranking factor is the alt tag. The alt tag is meant to be the “alternate” text if an image is unable to load or can’t be displayed on the page. When you have alt tags it creates stand‐in text if there is a problem with an image loading. Anyone accessing the page can at least see what the image was supposed to be if the image fails to load.
You can use the image name for the alt text unless it doesn't make sense to. A good alt tag for the image golden‐retriever‐puppy.jpg would be "Golden Retriever Puppy." The key with alt tags is to use a short description of what the image is or what it's supposed to represent.
You can pick up a lot of free traffic easily by just naming your images correctly. So few website owners name images what they are you can sometimes rank highly on image search without doing anything else. Easy traffic coupled with a higher search engine score makes image optimization a necessity when it comes to SEO.