There is no evidence that reading in dim lighting is detrimental to your vision. It can cause more strain if there is poor contrast, but most devices are backlit and have good illumination. More lighting tends to be more comfortable when reading and if you are older, and have the start of cataracts, good lighting is essential to being able to see up close.
Additionally, make sure to limit too much screen time at night. If you do not, it can throw off your sleep schedule because of blue light emitted from devices. The excess blue light makes your body believe it is day time and your circadian sleep rhythms are thrown out of whack. This is where a blue light filter may be helpful.