This article explains several methods to take better sunset photos using your iPhone's camera.
How to Photograph EPIC Sunsets with iPhone
Many sunset photos posted to social media have a common problem that’s relatively easy to fix: crooked horizon lines. Camera apps often have a grid lines switch, including the built-in camera app. You can find the Grid Lines switch in the Camera menu of your iPhone’s settings. This will overlay a rule-of-thirds grid on your screen when you’re using the camera. When shooting, pay attention to the horizon lines in your scene and keep them aligned with the grid lines.
For photos you've already taken that are crooked, most photo apps have a straightening feature. It's included in the editing controls of the built-in iOS Photos app. To use the straightening feature, tap Edit while viewing the photo in the camera roll, then select the crop tool. Swipe left or right on the angle scale and a grid will appear over the image to help you straighten the horizon lines.
Keeping your horizon lines straight in the first place will help you get the most out of your composition without having to crop out important parts of the image when you edit your photo to straighten it. It will also keep your image well-balanced and more pleasing to the eye.