If there is ambient light in the room, my understanding is that you only need to put the light on if you have a planted tank. Otherwise, put it on when viewing and turn it off when not . . . that's what I do with my non-planted tanks.
I guess there's two ways to read the question. Fish don't 'need' the light on at all if there's room light. But, if looking for a recommendation for lighting cycle, then 8-12 hours. I agree with Glaneon that the regular cycle that a timer can give them brings some routine to it for them and you avoid startling them any more than you have to by randomly turning on and off the light. Of course the algae factor comes into play and can affect the light duration recommendation. I also prefer to have the tank light already on when I walk into the room, so I can view and enjoy them even when passing through.