How do I take screenshots of the Touch Bar?
From this article by OS X Daily:

The new MacBook Pro with Touch Bar has replaced the standard Escape and Function keys with a little dynamically changing screen called the Touch Bar. Some Mac users may wish to take a screenshot of the Touch Bar, perhaps for developing, testing, or sharing purposes, similar to screenshotting displays on any other Mac or iOS device.
There are two different keyboard shortcuts to capture screen shots of Touch Bar on a Mac. One saves the Touch Bar screenshot as a file on the desktop, and the other copies a picture of the Touch Bar to the Mac clipboard instead. You can also take screenshots of the Touch Bar with the Grab application in Mac OS.
Take a Screen Shot of Touch Bar as a File on Mac
Command + Shift + 6
The Touch Bar screenshot will appear on the desktop like any other screen shot would.
Copy a Screen Shot of Touch Bar to Clipboard on Mac
Control + Command + Shift + 6
The Touch Bar screenshot will be copied to the clipboard, which can then be pasted elsewhere as needed. This functions like a Touch Bar specific version of Print Screen in that the picture is not saved as a file but instead goes to the clipboard, a bit like Command+Shift+Control+3 on Mac.

The “Grab” app also supports taking screenshots of Touch Bar, if you prefer to use Grab rather than the standard Mac OS keystrokes for snapping screenshots. Grab is found in the /Applications/Utilities/ folder.
Another option would be to run a virtual Touch Bar with an app like Touche or Touch Bar Demo and then screenshot the Mac directly, but that’s more work than necessary for most users with a Touch Bar, though it would be the only way to snap a Touch Bar screen shot for Mac users without a Touch Bar on their keyboard.