Cloudy days and darkness may both provide perils to my eyes. For this reason I have the following tricks to prevent the onset of a migraine due to wayward light.
I wear my sunglasses inside and out. I don't know, or care, if others think I look cool. Going from outside-in is a change in light quality, until I get used to the ambient light, I take no chances.
I sit so that there are no lights shining directly into my eyes. This can be difficult at times, because I have this thing about sitting with my back to the door (too many westerns?). Diffused or filtered light is not nearly so bad on my head.
I close my eyes before turning on a light. It helps to face the floor as I open them as well. Any sudden or Phlit-ering of light can trigger a sudden migraine. Usually the sunglasses help with this as well. My family warns me before they turn a light on, or off in the room.
You may have your own tricks to prevent light from triggering your migraines. It's important to create habits that allow you to exist free from light triggered pain. Feel free to share any tricks you may have. You can email them to me if you don't want to put them in comments. You should subscribe to my blog if you would like to learn some of my tricks for other potential triggers!