Auto-brightness is a feature designed to save battery life and make your iPhone’s screen easier to read. When you’re somewhere dark, like your bedroom at night, the screen will automatically dim. When you’re somewhere bright, like outside on a sunny day, it’ll crank itself up to maximum brightness.
Source: How-To Geek