You generally don't want to do it, and mh01 explains why very well in his answer. You don't want to make it part of gameplay. You might want to add it for taking screenshots or video. But I recommend an external tool like Fraps for that anyway.
But, that being said, you can do it in XNA. There are two methods.
Method number one is to call
GetBackBufferData (MSDN). You need to set your game project to the HiDef profile (the method is not compatible with the Reach profile).
(I also think you may need to play with the
RenderTargetUsage of the backbuffer, if you also want to render that frame to the screen. I haven't played with it enough to be sure. But this answer gives you a starting point.)
The place to do this is right before the end of your
Draw method. You could even put it in
EndDraw. It basically needs to happen after everything is drawn, but before the backbuffer gets sent to the screen (and becomes unavailable to you).
The second method works in the Reach profile. The theory is similar, but instead of drawing to the backbuffer, you draw to a
RenderTarget2D. You need to set that as the render target (with
GraphicsDevice.SetRenderTarget) either at the begninng of your
Draw method, or where you would otherwise call
SetRenderTarget(null) (which would set the back buffer as the render target).
At the end of your
Draw method, you've got an empty backbuffer and a render target with your scene in it. So simply call
SetRenderTarget(null) and then use
SpriteBatch (or similar) to draw the render target to the backbuffer to make it display.
When you want to extract the content of the render target, call
RenderTarget2D.GetData. You can also use methods like
SaveAsPng - which is convenient if you are trying to implement a screenshot feature.