Yes, it is illegal. Under the Road Vehicles Lighting Regulations 1989, front and rear fog lamps may only be used when visibility is seriously reduced (generally below 100 meters / 328 feet).
Fog lights are intensely bright and cause dangerous glare for other road users in clear conditions, reducing their visibility.
Rule of thumb: If you can see the tail lights of the car ahead clearly, turn fog lights off.