I am looking for a way to control the switching on and off of up to 32 lights from a software program. Is there some kind of box that can be connected to the lights and to my computer that the software can control?
Look up computer controlled Christmas lights... It's become quite popular and there are lots of DIY (and commercial) relay boards out there (complete with software) to automated and control lights...
This site is probably a good place to get some ideas, they have several links to DIY systems...