The physics of this applet are pretty basic. Observed edge on, an orbiting object will appear to trace out a sine wave over time, with amplitude "a" and period "P". So we simply have the applet recalculate and plot the position of each moon based on this sine wave.
We define sunrise and sunset as occuring at 6am and 6pm respectively. If you try and observe between these hours of the day, you'll just get a sunny day picture.
Weather works this way: Normally you'd have a 50/50 chance of it being clear (hey, this applet is based in Cleveland, remember?). Then the odds of the weather changing depend on how much time elapses. So let's say you start off with clear weather. If your next observation is one hour away, the odds of it staying clear are 90%. If you observe 3 hours later, the odds drop to 80%; 6 hours later it's 70%; and a day later you're back to 50/50.