Suddenly my phone does not detect my SIM while it detects service providers' names I am using rooted but stock Nexus 5 D820 with service provider Airtel in India.  When I occasionally glanced my phone it said that the SIM is not detected.

I soon discovered by various means that my phone is accepting the SIM while there is no problem with the SIM and the network. I isolated these by trying other working SIMs in my phone and my SIM works on other phones.  Also switching from 4g->3g->2g also tried.

IMEI is okay and not changed. EFS folders are backed up.  This issue did not happen during any tweaking operation, rather should have happened after few minutes after receiving the call.

Service center staff said they had to replace the entire board.

Question: If you are still reading, though my SIM is not detected, the phone can still search network providers when I choose manual option for network selection.  When I choose my service provider manually it fails to register.
My question is if the hardware or the SIM has gone defective, how it can scan for available networks but not register with my network?
The SIM card isn't actually what allows your phone to connect to a network, but it has your subscriber details (i.e. the information that links the phone with your account with the phone company). If you think of it like the Amazon website, you can load the site and look at goods without logging in, but you need your login details to actually place an order. Typically you can connect to any network without a SIM card, but the network will only let you make emergency calls.

As you suspected, there might be a problem with the hardware of your phone reading the SIM card, in which case you'll have to replace the parts as the phone company suggested. One other possibility is that the SIM card is slightly loose in the tray, and it's worth looking at this first. This is especially likely if it works sometimes, and if (as you say) it's only this combination of SIM and phone that doesn't work reliably. I had a similar problem once with a SIM I'd cut myself to micro-SIM size: it was slightly too small, and any impact to the phone would knock it loose, putting the phone into "emergency calls only" mode.

If the SIM card is too loose, a piece of tape or stuck over the side without the contacts might help to keep it in place, or use a small piece of paper inside the SIM card tray (if you have one).

Also, if it's only this SIM card that doesn't work with the phone, it's worth asking your phone company for a replacement. Typically they'll send a replacement for free, and if there is a charge it'll be much smaller than a phone repair. There might be some nuisance about getting the new SIM card associated with the old phone number.