Whilst the Sounion anchorage mentioned by RAM is OK for visiting the ruins up on the headland, or even overnighting, I wouldn't recommend it for a visit to Athens - the holding is rather patchy and wind/swell works its way in at times.
In the unlikely event that you manage to get a berth in one of the Athens
marinas in summer, the cost will be ludicrously expensive, anchoring/mooring elsewhere and travelling in will be far cheaper, even if you need to stay overnight.
Aegeana is the nearest option, but I'm always wary as there are a lot of
boat movements in the harbour there and tripped anchors are far from rare, so I've always ensured that someone knows we're off for the day and will keep an eye on our yacht whilst we're away.
Whilst the
ferry trips are further/more expensive, my preferences/first choices would be Methana or Poros on the Pelopenese. We've also had crew arrive/depart from further round the Pelopenese at Ermioni and Porto Kheli - there is a fast
catamaran service which runs Pireaus-Aegeana-Poros-Hydra-Erminoni-Porto Kheli, about six times a day; it's great for visitors as we pick them up in Aegeana and then sail downwind for the week of their visit, before putting them back on the ferry at Porto Kheli, so there are no worries about getting them back North if the
wind picks up.
If you're looking for the 'cheap' options, you can
anchor fairly securely in Ormos Anavissou (037.431N 023.555E) about 20 miles SSE of Athens, from where it's about a mile walk up to the main road, on which you can catch a bus into Athens for about €3. We've also once stopped for a few days/visited Athens from Ormos Vouliagmenis (037.485N 023.467E) which is only about 10M south of Athens; however, whilst nobody questioned us about what we were doing there, the bay is charted as being a 'no anchoring' area - go beyond the marina on the west side and
head as far inshore as you can manage - the seabed shelves very slowly.