DSLRs and higher-end cameras almost always have a port for a remote switch that makes it easy to automatically capture shots at specific times. Even if yours doesn't, this guide from DIYHacksandHowTos will show you how to add one, then use it to grab perfectly timed photos.
The video above walks you through the process, but the goal is pretty straightforward -- even if you don't have a DSLR that has a remote switch terminal, you can either build a manual switch that will press the shutter button at the top of your camera, or you can wire an auto switch to a remote trigger fairly easily (as long as you're careful about disassembling your point-and-shoot.)
Once you have a trigger wired up or attached, you can then connect it to any manner of trigger, whether it's a manual trigger you toggle yourself, a tripwire for home security purposes, or even a pressure plate like the one we mentioned before. He also shows you how to use a microcontroller like an Arduino to take photos at regular intervals, schedule time-lapse photos, or program it for remote control so you can activate your camera when you're not nearby. Hit the video above or the link below to learn more, and see what you need to try this out yourself.