Firefox provides the keyboard shortcut
Ctrl + B for opening or closing the bookmarks sidebar. Strangely, there is no keyboard shortcut provided to show or hide the bookmarks toolbar. This is irritating since I prefer to use the toolbar over the sidebar.
This functionality can be obtained by installing the Hide BookmarksBar addon. In its Preferences you can set the keyboard shortcut you want. I like to set this to
Ctrl + Shift + B, the same as in Chrome.
Tried with: Hide BookmarksBar 3.3.1, Firefox 41 and Ubuntu 15.04