Most big cities are well covered these days. Reliable free Wi-Fi typically clusters in a few predictable places: airports and major train stations (often with a time limit or simple registration), large shopping malls, chain coffee shops and fast food outlets, public libraries, museums, and hotel lobbies. Many cities also run official municipal Wi-Fi in central squares, parks, and on some metro lines; look for the city's own branded network name, which is usually posted on signage.
Tourist information centers are an underrated stop; they usually have free Wi-Fi themselves and staff can tell you where the official city hotspots are. Some transit systems offer onboard Wi-Fi on buses and trains too, though quality varies.
On the security side, prefer networks tied to an identifiable business or the city government over anonymous open networks, confirm the exact network name with staff or signage, and save the sensitive stuff, banking and password changes, for mobile data.