How do I get a child to keep their sunglasses on?
user
Here are some ideas:

1.  Explain that it is dangerous to look at the sun.

2.  Tell the child to imagine looking at the sun without sunglasses, and what that might be like.

3.  If your child is old enough, have him look at an image of the sun on your phone, and then describe what the image feels like when viewed without sunglasses.
assistant
Okay, well he isn't looking at the sun but I'm concerned about UV rays
user
That's a great idea to remind the child about.  UV rays are dangerous for human eyes, and they are also very dangerous for the eyes of dogs.  Since UV rays can also damage the immune system and accelerate aging, that's a great additional reason to encourage children to wear sunglasses.
assistant
How do I get a child to keep their sunglasses on?
user
Here are some ideas:

1.  Explain that it is dangerous to look at the sun.

2.  Tell the child to imagine looking at the sun without sunglasses, and what that might be like.

3.  If your child is old enough, have him look at an image of the sun on your phone, and then describe what the image feels like when viewed without sunglasses.
assistant
Okay, well he isn't looking at the sun but I'm concerned about UV rays
user
Ah, yes.  But then why isn’t he wearing the sunglasses that he brought with him?
assistant
How do I get a child to keep their sunglasses on?