This is a commonly circulated notion, that cheap sunglasses may damage your eyes. The two reasons that are most commonly cited are that (1) the glasses do not provide enough UV light protection, but still allow your pupils to dilate, resulting in more UV light entering the eyes or (2) that the thick plastic in the glasses may bend the light to some degree, just like prescription glasses, leading to eye strain. Although both of these reasons make some sense from a physiological point of view, I am not aware of any scientific or medical studies that have actually evaluated them and proven whether or not they are true. So the best thing to do is to discuss this with your eye doctor
It stands to reason, at a bare minimum, that you should read the UV light rating on any pair of sunglasses that you buy, to make sure that they are adequately excluding the UV light. Many inexpensive sunglasses do this quite well.
Again, it would be a good idea to mention this issue to your regular eye doctor the next time you see them. Since they know your specifics of your eye health better than anyone else, they will be able to provide you with more detailed advice and answer any other general questions you might have!