I need an application/script or some way to record when a user logs onto their PC, when they logoff and the users name. I would like to have it save to a .csv or a data file that I can pull together and use as a punch clock type system. Also maybe a script that something like auto hotkey can run and gather up all the times every night and save them into one overall time sheet.
Most operating systems already do this - logging functionality for logons/logoffs is pretty standard.
In Windows the Event Log stores this information. Check out http://www.windowsecurity.com/articles/understanding_windows_logging.html for deeper information.
In Linux you would look under /var/log/adm
Both could be easily used to track logon/logoffs if you want to measure time/attendance
It is not exactly what you are asking for, and it is a bit clumsy in places but this app may give you a starting point. It is written in AutoHotkey Basic and is open source so you can modify it to your needs.