How can I tell whether I'm running a 32 or 64 bit kernel?

The command "isainfo" was provided for precisely that reason;

64% isainfo -kv
64-bit sparcv9 kernel modules

32% isainfo -kv
32-bit sparc kernel modules

amd64% isainfo -kv
64-bit amd64 kernel modules

Solaris 2.6 and earlier releases are always 32 bit and lack the
"isainfo" command.

[an error occurred while processing this directive]