Assuming that there's nothing wrong with the hardware itself, 2GB RAM is plenty for Windows 7. Chances are that the bottleneck on older gear will be the disk drives anyway.
Although I think Windows XP is perfectly fine for most things, MS will stop releasing patches for it early next year which will leave you wide open for unpatched exploits. On that basis, I'd recommend Windows 7, unless you've got old software that won't run on it (some older games, for example

).
Of course, there are alternatives to Windows, depending on what you want to do with the PC in the first place. I've got XP, W7, Linux and others running on various gear at home.
Phil.