i don't know if there's a way to prove that you have the most-efficient algorithm. however, we can place a limit on how good that algorithm is.
clearly, the minimum time for all the prisoners to be freed is 100 days. however, this could only occur by a very lucky (1/10^42) guess.
you can count how much information a person has by the maximum number of independent yes/no questions he can answer. "independent" simply means that knowing the answers to some of the questions still does not give you the answer to other questions.
in order for a given prisoner to know for certain that he should declare that everyone has entered the room, he needs to know the state of 99 other people
this leads to 99 independent yes/no questions:
has prisoner 1 entered the room yet?
has prisoner 2 entered the room yet?
has prisoner 3 entered the room yet?
...
when a prisoner enters the room for the second time, he now knows that the message he gets from the bulb is one of four possibilities
first visit on, second visit on
first visit on, second visit off
first visit off, second visit on
first visit off, second visit off
This means that the most independent yes/no questions he could answer with this information is 4
on his third time in the room, he now knows the state is one of eight possibilities (each of the four from last time can have "third visit on" or "third visit off" appended to it)
the fourth visit gives 16 possibilities, the fifth 32, sixth 64, and seventh 128
so after seven visits to the room, the maximum amount of information a prisoner could get is enough to answer 128 yes/no questions
this means that no matter how clever the prisoners are, they can never get someone to know with certainty that everyone else has entered the room until that prisoner has entered the room 7 times.
this sets the new bare minimum for escaping the prison with certainty to 106 days.
if the prisoners name a certain guy to be the guy who will set them free, and if they were to invent an algorithm that would get him the information he needs, then the probability distribution for time for him to enter the room seven times is binomial.
on average it would take 700 days to free the prisoners.
actually a little more, because it's possible the guy would enter the room 7 times, and still find not everybody had entered, in which case you would have to wait another 100 days.
however, it is likely that no such efficient algorithm for communicating the information through the light bulb exists. this merely sets a minimum bound on how fast they can get out. i think the minimum average time is longer, but i don't know how to prove that no better algorithm than those already found exists
in as far as finding the probability that everyone has visited the room after a certain number of days, i'm embarrassed to admit i thought about it a while and don't know the answer. i asked my friend who is smarter than i am and he didn't know, either.
anyway, i know that the method of .99^n for the probability that a given guy has not entered the room isn't helpful, because the individual prisoners' probabilities are not independent.
if anyone does figure out the exact probability (approximate is pretty easy) i'd be interested in seeing it