Smoking itself is not illegal on UK airlines. However, if smoking is prohibited by the aircraft commander the failure to obey that prohibition could result in a fine not exceeding level four on the standard scale (£2,500 if I remember correctly).
If the smoking endangers the safety of the aircraft then up to five years in prison.