The UK legal rated ‘nominal’ or ‘continuous power for one hour’ limit for a standard e-bike system (for public highway use) is 250 watts (momentary peak power can be twice this or more – as much as a pro cyclist in fact!). The maximum assisted speed allowed is 15.5mph. More than 250 watts nominal power or 15.5mph assisted speed and it ceases to be legally classed as a bicycle and effectively becomes a moped, requiring a relevant licence, vehicle registration, helmet wear, insurance etc. Penalties for illegal acts committed on such a bike would then apply to your vehicle licence.
In practice, all e-bikes sold by mainstream UK retailers for use on the public highway are legal, just be careful to check there has been no aftermarket power or speed modifications if buying a used bike. If buying a bike or a DIY system via the internet check that they meet legal requirements.
Speed or ‘S’ Pedelec e-bikes like this look the same as legal ones, but top out at 28mph due to more powerful motors and different gearing. You can buy one in the UK, but it needs to be registered/insured/taxed etc just like moped. Good article on this from e-bike tips here
Note: The one area where the UK deviates from the EU is in allowing the fitting of a ‘Throttle’. In both the UK and the EU a powered ‘’Walk’ function is allowed up to 6km/h. (And is sometimes very useful, like when walking the bike up ramps) but in the UK a ‘Type Approved’e-bike may also be fitted with a press button or twist grip throttle, provided it only works when the pedals are being turned, and assistance cuts out at 15.5mph.