Entanglement Hamiltonians of lattice models via the Bisognano-Wichmann theorem