Try restarting your Mac, then reopen App Store and try installing.
If that fails, enable App Store debug mode by going to Terminal and typing this:
defaults write com.apple.appstore ShowDebugMenu -bool true
Go to App Store, click Debug on the menu bar and then 'Reset application'. Restart, then try again. If it works, turn off the Debug menu by entering the same command in Terminal, but replace true with false at the end of the command.