Looking at the sun while it's in full brightness during the day could damage your eyesight because of the intensive UV rays it puts out.
But when the sun is setting the sun is not as bright so it won't do much if any damage to your eyes.
I've sat outside watching the sunset since I was a kid with my dad and it so far has never harmed my eyes.