Sun2 is super preliminary, it has no I/O other than the BW2 video. The sun3_80 driver has serial ports that you should be able to type into, but the Z8530 chip emulation in MAME is still very WIP (Edstrom's been working on it). You can see serial ports in drivers that have them with -listslots.
"mame64 sun3_80 -rs232a terminal" will connect MESS's generic (not emulated) terminal to port A on the Sun 3/80; you *should* be able to type and have it appear on the Sun's screen, but I couldn't find a baud rate that worked which suggests the 8530 isn't totally fine yet.