Many employers include optional equal opportunities questionnaires as part of their job applications. Whether or not you choose to answer the questions shouldn’t affect your chances of landing a job interview.
Keep in mind that employers are legally prohibited from discriminating against applicants based on their race, religion, gender, sexual orientation, and other identifying characteristics. However, employers are allowed to view applicants with protected characteristics more favourably than those with similar qualifications but no protected status.
So if you feel uncomfortable answering demographic questions, skip that part of the application. Or research the company to get a better read on their hiring practices.