It is a criminal offence for your employer to employ someone who doesn’t have the right to work in the UK and there are stiff fines and penalties for employers found to be employing illegal workers.
Employers are under a legal obligation to ask all workers for proof of their right to work in the UK (and only certain documents can be accepted).
Asking all workers to provide proof of their right to work in the UK is not race discrimination. Selecting only some individuals and not others – based on stereotypical assumptions about, say, appearance, accent, language or name – is likely to be race discrimination.
Your employer should be following a statutory Code of Practice (updated in 2014) Avoiding discrimination while preventing illegal working (PDF, 62 KB).