In Pokemon X and Y there are specific locations in the game that allows you to save what are essentially 3D screenshots from the upper screen using a virtual camera. This made me wonder - is it possible to take screenshots, 3D or otherwise, from within the 3DS?
In many cases, yes.
There is no "save screenshot to SD card" feature in the 3DS as of right now. Some games allow you to take pictures under certain conditions (the camera man in Pokémon XY, the camera in Pilotwings Resort, pressing L + R in Animal Crossing New Leaf, etc.), but this differs from game to game.
With the Miiverse, however (which was added to 3DS in a firmware update), you can post whatever is on screen at the time if that particular game has a Miiverse community (and you are able to bring up the home menu, of course) - and then only in that particular community. After posting a screenshot on Miiverse, you can then access the image via Wii U, 3DS or the Miiverse site.
If you have custom firmware installed on your 3DS, there are many homebrew tools able to take screenshots:
If you have Rosalina, press L+Down+select to open the menu, then select "Take screenshot (slow)". It's indeed slow (about 10 seconds), but otherwise woks fine, even with extended memory games like Pokemon X/Y.
If you run the game via TestMenu, suspend it using Home, then press L to take the screenshot. I'm not using this tool so cannot tell how well it works.