The solution to a light outside your window is a heavy curtain, I carry clothe pins or safety pin and hang my hammock over the window.
This light could have been installed in many locations, however it was installed right outside the door to my room.
Generally, a good Hotel only has doors on hallways, and window facing away from the building. Windows allow both noise, air, and light to enter. Weighing the consequences will optimize the enjoyment of the room.
Often Bed and Breakfasts are the worst, then again, having a few drunks enter the Hostel and turn on the light can truly be annoying.