It really couldn't be easier to get here, as the Copenhagen S-train commuter network has a line ending here, which means that you can get here in 40-50 minutes from Copenhagen Central station and have trains throughout the day. There are also some trains like the one in the picture, going along a couple of lines in eastern Zealand, as well as connections to nearby Roskilde.
Køge is at the end of the E Line of Copenhagen regional trains. From Nørreport station, it's a 45 minute ride. Naturally, many residents of Køge commute to the city, but this is certainly more than a suburb