This is a great question: such add on products are one of the most common forms of misuse
As long as it does not interfer with correct installation/use of the carseat + your vision is not hindered + there are no hard/sharp edges ... then it's considered an acceptable risk, especially if the sun is causing a medical or behavioral concern which distracts the driver.
The basic "test" to see if the suction cup style shades are OK is to have your spouse or friend throw it at your face as hard as they can -- if you don't want that to happen then you really don't want it in your vehicle where it would come loose flying at your child's face with crash force speed!