Depends on the range, for a meter or so you could use an infra red led and something like a bpw 41 pin diode, however if you want longer range then I'd be inclined to use a tv type remote control infra red receiver and for the transmitter an infra red led connected to a 40khz source such as a 555 circuit or direct from a microcontroller.
Heres an interesting circuit, in the receiver you wouldnt need the 555 or the 4017, you could connect the o/p of the infra red receiver direct to a micrcontroller.
**broken link removed**