All microcontroller developers for debugging and device control use serial communication via a computer (or other device). The most commonly used serial communication is RS232. Ten years ago, every computer was equipped with a serial port, but today it is uncommon on PC platforms and almost non-existent in laptops.
IR data transfer is very often used in devices around us. Every TV, audio system, Air Conditioner uses IR remote controllers. Every device that receives IR commands have one simple IR receiver component inside it. It is usually covered with IR filter to reduce noise from daylight. This is not necessary when making IR remote control project with microcontroller.