Loyalty is improved in the following ways (Will add more as I find them),
- Each population provides 1.0 loyalty up to 9 tiles away but are 10% less effective for each tile away.
- Heroic/Golden Ages add 0.5 loyalty per population.
- Dark Ages remove 0.5 loyalty per population.
- Governors established in the city emit +8 loyalty (some can be promoted for more) and other civilizations' governors in nearby cities can reduce your cities' loyalty.
- The happiness level (Amenities) of your city affects loyalty.
- The Limitanei military policy card provides +2 loyalty in a city with a garrisoned unit.
- The city-state Preslav provides +2 loyalty in cities with an Encampment district when Suzerian.
- There are two city projects that can increase loyalty when complete (Break and Circus projects).
- Culture alliances with other civilizations can prevent negative loyalty effects from population of that civilization.
- Recently captured cities (through military) will have loyalty penalties, but these can be ignored with a garrisoned unit inside.
- The Audience Chamber building in the Government Plaza district applies a -2 loyalty penalty to every city without a governor (Thanks to David Harkness).
I found this information in-game on the city panel (loyalty page).
