Electric sockets directly under water pipes under the sink - Safety
I believe this is not uncommon. The circuit must be protected by an RCD (RCBO). There is usually a means of disconnecting or isolating the socket from above if the socket is inaccessible when appliances are installed.

However see NICEIC/ELECSA Guide to Electrical Work in the Kitchen


  Electrical sockets or switches should be fitted at a safe distance (it 
  is recommended at least 30cm horizontally) from a sink to avoid 
  the chance of water coming into contact with electricity.
  
  Sockets should also be easily accessible. If appliances such as 
  fridges, dishwashers and washing machines are fitted under 
  worktops, getting to sockets may be difficult. Ideally, these 
  appliances should be controlled by a switched fuse connection unit 
  mounted above the worktop where you can reach it easily.
  
  All new sockets in a house require protection by an RCD (Residual 
  Current Device)


The Consumer Units (Main Electrical Panel) in UK homes now typically have Dual-RCD protection. You could easily check this by inspection.

You can buy advanced socket testers that would allow you to verify correct RCD operation at the sockets under your sink.

If you want, I suspect there is nothing stopping you replacing the socket faceplate with one rated for external use (with a rainproof cover which can be closed over plug-cables) - some incorporate RCD protection. I suspect most electricians would regard this as pretty odd though.

If you search for advice you'll often see something like


  Regulation 512.2.1, requires equipment to be of a design appropriate to the situation in which it is to be used or its mode of installation must take account of the conditions likely to be encountered.


I am not an electrician and do not have access to the 17th Edition. The above does not constitute advice from a qualified person. You can pay for an independent inspection and electrical installation condition report (EICR)