Why sunrise and sunset? Obviously there’s beautiful light at that time of day, but you’ll also find the smoothest air. It’s a great time to introduce others to flying. Sunset starts to mix the colors of the setting sun with lights on the ground. You weren’t thinking of making these flights without a camera, right?
If you are flying alone, get a GoPro or Garmin point-of-view video camera, set it, and forget it. You’ll enjoy seeing it later (yet another way to introduce others to flying), and you won’t be distracted by taking pictures while trying to fly, look for traffic, and mind the passengers.
If there is a window that can be opened, try to shoot through the opening. (Owners of aircraft with a canopy can’t do that, but can get great wide-angle shots using the canopy as a feature of the photograph.) Try to keep struts and airframe parts out of the photo. You may find that shooting the actual sunset is impossible without shooting through the front windscreen, but light on the ground can be spectacular during sunset. If you do shoot the sunset, the automatic exposure of a still camera will darken the ground. In that circumstance, light playing off the nose or the prop may be a good substitute for missing features on the ground that are underexposed.
For those with adjustable cameras, try to use a fast shutter speed so that the picture will be sharp despite the movement of the airplane, and the vibration from the airframe.