The English legal system always offers the alternatives of 'swearing' (on the Bible) or 'affirming' (which does not involve any reference to religion).
I have given evidence in both Magistrate's and Crown Court cases and, as an atheist, I've always chosen to affirm.
However, you don't have to get anywhere near a court to be required to make the choice. When I sold a house, the buyer's solicitor required that I should colour a plan showing the rights of way of to, and across, the property. He also required that I should take the plan to a commissioner for oaths and swear that I'd provided the information accurately. When I told the commissioner that I was an atheist, I was allowed to affirm, rather than to swear an oath.
Similarly, when I sought probate for my late father's will, the Probate Office were happy for me to affirm, rather than swear, that I had provided them with accurate information.
Chris