Found this copied below from an old post. If you have a credit card this one seems to work well:
Following OFCOM regulation, all O2 sim cards come with age restriction turned on.
The customer or user must be able to prove to O2 that they are over 18 to have the restriction removed.
Sites, as classified by the BBFC (British Board of Film Classification), are included.
How do I know?
If you try to go to sites that are 18+, you might get a ‘Timed out’ or ‘No Response’ message if it’s a secure site (HTTPS).
How do I prove I’m over 18?
There are three ways you can do this. Once you do, O2 will take off the filters and won’t ask again.
You can prove you have a credit card by:
Parents can also set up the Parental Control service, which makes sure your children can only go to sites that are suitable for them. Go to parentalcontrol.o2.co.uk to set it up.
Sometimes O2 might block a site by mistake, or might miss an adult site. If this happens, call customer services on 202 to let them know.
Also some sites, which host illegal content, are automatically blocked to everyone. O2 can’t unblock those.
You may also find similar restrictions when using Wi-Fi, if so, you need to check your router settings or contact your ISP as O2 do not have any control over that.
Track usage, upgrade and get support with the My O2 appDownload My O2