I mostly rely on wikipedia, although certain nations are harder to do than others. Note that some nations are very conventional (i.e. Japan) while others are unreasonably-inconsistent (i.e. Britain, France). It helps to look up a certain class of ship (not necessarily a modern class; sail frigates are a useful one to pull names for cruisers or destroyers from, for instance). It also helps if you're vaguely-familiar with the language (or if it translates well; Japanese is incredibly-hard to translate online compared to something like Russian or French); for instance, Russian names are more conceptual (i.e. watchful, impetuous, proud, bold, sly).
In Japan's case, you're looking at weather-type names for destroyers (more fanciful names than in English, mostly two-part names), rivers/mountains/straits for cruisers (including battlecruisers), a few borrowed BC/BB names for carriers plus bird, phoenix, or dragon names, and province names for battleships. The US is also incredibly-conventional, with carriers and battlecruisers being the awkward ones that borrow historic ship names as well as battle names (and a few specifics like Hornet and Wasp). Certain classes also frequently pull a particular theme that isn't consistent with the rest of the ship type (i.e. the Italian Soldati class represents soldiers, while the Oriani-class was named after poets).
When it comes to nations using historic ship names, its important to keep in mind certain names which are connotated more with certain governments (i.e. France using more monarchist/nobility names as a Right-wing government, and more revolutionary and Renaissance names as a Left-wing government). A ton of old sail ships also use royalty, nobility, or saints in a way that fell out of favor by the modern era. Common themes include soldiers, towns, constellations, mountains, historic battles, generals/admirals, famous leaders (including politicians, monarchs, nobility, and philosophers), mythology (particularly Greco-Roman), and nationalist symbols.