Well, sort of a system, though the changing nature of the fleet over the years means that new names are introduced and some old ones fall by the wayside.
Some probably weren't much liked by the crews - serving aboard the TBD HMS "Fairy" might have been a test of character. Their Lordships obviouly thought better of this idea as the Flower class corvette "Pansy" was renamed "Heartsease" before lauching
Often a class of ships would be given names that tied the members of the class together in some way . G class destroyers as in the case of Glowworm had names beginning with G , ethnic groups or nationalities such as Zulu or Maori were used for the "Tribal" class. There were also Hunt class escorts named after foxhunts, Racecourse class minesweepers, Flower class corvettes and so on.
Cruisers often got the names of counties (e.g."Shropshire", "Kent"), or classical names ("Leander", "Ajax" "Achilles") , and the WW2 lend-lease destroyers were given names of towns that could be found in both in the Britain and the US e.g "Ludlow"
Capital ships (which category includes nuclear submarines these days) tend to perpetuate the names of former ships of the line ("Resolution" etc), admirals (e.g. "Hood", monarchs ("King George the Fifth") and sometimes former prizes - "Temeraire" was a french prize of the 1750s later taken into the Royal Navy, for example, though the name is now attached to a stone frigate. These names tend not to follow any rigid system due to the very few ships involved
Names are recyled for other types of ship - classical names which first came into use on ships of the line in the 1700s were later used on cruisers and then on frigates - "Leander" for example