Some digital cameras come with an optical viewfinder and some come with an electronic one. However, if you plan on taking photos of sunrises and/or sunsets you should remember to never point the camera at the sun if you’re using an optical viewfinder.
The reason for this is that your viewfinder isn’t tinted. This means it’s just like looking straight into the sun with your naked eye, and of course this can be quite dangerous to your eyes and could cause them damage.
If you can, you should use the camera’s LCD when taking shots of the sun. You can use a tripod if you’re worried about camera shake, but if you’re shooting at sunrise the sky should be bright enough to allow you to take fast photos with a high shutter speed, which will cut down on shake.
Your sunglasses will darken your vision and because of this you may overexpose the photos. It’s a good idea to take the glasses of when shooting, but make sure you don’t look directly into the sun.