The original purpose of alt text was to provide a description of an image that couldn't be displayed. In the early days of the internet, when connection speeds were much slower, this text helped users understand the content of images that were too large to load in their browser. Today, images rarely fail to load. However, if they do, the alt text is displayed in place of the image.
Yes, having alt text for your images is a ranking factor for Google image search. For some websites, image search traffic can be a significant contributor to their overall success. This is especially true for ecommerce websites, where users often start their product searches with a Google image search instead of using the standard Google search. So if you want to make sure your website is successful, make sure you have alt text for all of your images!
Having your images be visible in Google image searches is undoubtedly important for multiple reasons, but one often overlooked element is accessibility. Nowadays, more importance is being placed on making sure that the web is accessible to everyone, regardless of any disabilities or impairments they might have. One way you can make sure your images are accessible is by using alt text that accurately describes the image, rather than stuffing it full of keywords. This not only helps those who can't see the image, but it also aids in understanding the context of the image and the rest of the web page.