If you go to System Preferences > Bluetooth, what does it say underneath the keyboard name? If it is not connected, click the little settings icon at the bottom and select Connect. If that fails, try deleting the connection from this window and then re-pairing through clicking the + icon here. It's possible something has gone awry with the pairing.