For a wifi router from your Internet provider, it's usually on a sticker on the bottom of the router.
If you yourself purchased and set it up, you'll probably have to reset the router if you don't have a note of it.
If a Mac has previously connected to its wifi, check Keychain Access (in the Utilities folder). Do a search for your network name there. You'll have to unlock the key with your Mac admin password.