you have to work on a computer with SharePoint.
The recommanded approach (my recommendation actually) is to install a local sharepoint farm on your computer (physical or virtual), code your program, then package it properly in a sharepoint solution (.wsp).
Deploy then the wsp on your production farm (after testing it of course).
You can install SP 2010 on a computer having Vista x64 or Win 7 x64. The major problem is the amount of ram. The minimum is 4GB, but it's highly recommended to have at least 8GB of ram.
I use a virtual environment to industrialize the SP dev process :
- I have a hyper-v R2 SP1 (support of dynamic memory is cool) host with a lot of ram
- I built a W2K8 R2 dev machine (install win + SP1 + hotfix, VS 2010 SP1, SP 2010 without running the configuration wizard)
- sysprep of the computer, then set the vhd file as read only
- then create on demand new dev computer, using the differentiation disk feature of hyper-v, and set a new local farm each time
This blog post(WSS V3, but concepts still apply to v4) describes part of this process.