Use an IR Remote to control the appliances (fan and light here).
- Press the red power button to switch OFF/ON both things at once.
- Press button 1 to switch ON the fan and press 2 to switch ON the light.
- Press button 1 again to switch off the fan and so for the light, too.
If you are making this project in real life, remember to power the relay SPDT with 5V coil through a 5V source only, and for the best performance of appliances, allow an external high power supply in the COM terminal of the relay.
But make sure that the high voltage wires should not come in contact with the low voltage Arduino and LCD circuitry as they work on 5V and short circuiting in the the system may damage the Arduino and other components.
Note : With different IR remotes, you should first check the codes of each button of the remote you are using.
And, please respect the project so that I can get Rep points for shopping some another components.