The former Union Station, now a courthouse, is a beautiful building and one can explore the lobby, which was originally the waiting room. The Amtrak station is an Amshack but you can see a lot of the BNSF yard from the platform, though IIRC you may need to buy a ticket to access it.
Tacoma Rail switches the port and has periodic open days. They also run up the former Milwaukee Road grade near the Tacoma Dome that tops 3% and can be photographed from the 34th Street Bridge, though operations are sporadic. A block south of the Amtrak station is an S-shaped trestle that is a common photo spot as viewed from the L Street overpass.
Sounder trains lay over in Lakewood, and the unique drawbridge over Chambers Bay a few miles south is another popular photo spot.
Tacoma also has a streetcar.