Tap Settings > Wallpapers & Brightness to adjust the brightness of the screen by dragging the slider, or turn on Auto-Brightness to use the built-in ambient light sensor*. When Auto-Brightness is on, the device's ambient light sensor measures the current level of lighting and uses that for future brightness adjustments.
When Auto-Brightness is enabled, you may notice that the brightness slider has moved to match the current light condition based on what was set before. If you adjust the brightness, the setting will learn to match the set brightness for that light condition.
* Auto-brightness is available only for devices with an ambient light sensor.
Also check Auto Lock..... Open up the Settings app, tap on General, tap on Auto-Lock, and set it to the time limit you’re comfortable with. Just remember if you turn it off completely that you’ll need to manually lock your phone every time you’re done with it.