Ken Shirriff has posted an Arduino-IRremote library. “This IR remote library lets you both send and receive IR remote codes in multiple protocols. It supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw protocols. If you want additional protocols, they are straightforward to add. The library can even be used to record codes from your remote and re-transmit them, as a minimal universal remote.”
You can read more about the usage and development of this library on Ken’s Blog page.
Of course for dedicated IR hacking without an Arduino there’s always the USB Infrared Toy.