There's a daemon called cron to execute scheduled commands, so you could "cron" the shutdown command to run at a certain time of day.
For e.g.
0 1 * * * /sbin/shutdown -h 10
This'll shut down the computer at 1 am, according to your computer's clock, giving you 10 minutes of grace time to cancel the shutdown if you're using your computer and you've changed your mind about shutting it down.
Granted this isn't a good idea for everyone, it's up to you if you want to do this or not, some people argue it's best to let the computer run all the time, if it's needed, and use power management instead, unless it's a server 24/7 scenario where you probably don't want any power management at all. Power management itself can create its own problems especially if your motherboard's got buggy ACPI. Some boards have really terrible ACPI power management.
If you've got a gui installed have a look at System->Preferences->PowerManagement or read your distro's manual on power management. If you're not already familiar with system scripts it's best not to mess with the system's internals manually.
Good luck