Main issue for me in bed is failure to identify face smooshed into pillow. Raise head and unlock fine, even in full dark. Still requires neck muscle actuation that wasn't required with touch id.
Depending on where you sit on the conscience/security sliding scale you might want to considering turning off “Require attention”. That solves 90% of glasses/sunglasses related issues.
I do it all the time, fwiw, but my girlfriend cannot get it to work reliably. So your mileage might vary, but in my experience ambient light does not matter.