Times are in IST, for the first rise and set after the chosen moment. "Up all day" or "down all day" means no crossing within 36 hours.
Every body has a point on Earth where it is straight overhead, its geographic position. The body is on the horizon for everyone on the circle 90° away from that point. Places on the western half of the circle have the body in the east, so it is rising for them; places on the eastern half have it in the west, setting. The program tells the halves apart by the body's hour angle, its angle west of each place's meridian: negative means rising, positive means setting.
"On the horizon" is not exactly 90°. Air bends light near the horizon by about 34 arc-minutes, so a body is seen rising when its centre is still 0.567° below the geometric horizon. For the Sun, whose rise is counted at its upper edge, add its 16′ radius: −0.833°. For the Moon, which is close enough that your place on Earth shifts it by up to a degree (horizontal parallax, π), the standard altitude is 0.7275 π − 0.567°, slightly above the horizon. Planets and stars use −0.567°.
Positions of the Sun, Moon and planets come from the astronomy-engine library (accurate to well under an arc-minute), bundled with the page. Star positions start from Hipparcos coordinates with proper motion and are precessed to the date. Rise and set lines are good to a few kilometres; real horizons, hills and unusual refraction shift what you see by more than that.