Mention you've been to Hakodate and every Japanese person you know will ask if you took in the night view from atop Hakodate-yama (334m) – it's that famous! You want to get up here for sunset or after dark: what's striking is seeing the lit-up peninsula (which locals say is shaped like Hokkaidō itself) against the pitch-black waters. In addition to the viewing platform and parking area, those who hunt will find the remains of an old fort behind the buildings, with interesting foundations intact.
There are a few ways to get here: by ropeway, bus, car or foot. Buses for the ropeway (¥240, 10 minutes) and the summit (¥400, 30 minutes, mid-April to mid-November) depart from bus stop 4 at JR Hakodate Station. You can also walk to the ropeway in 10 minutes from the Jūjigai tram stop; alternatively you can hike up one of several trails (all take about an hour) between May and late October. Note that the road to the summit is often closed to private vehicles after sunset because it gets too crowded.