Hi Dune,
Great question. First let me point you to the online documentation for compositing Terragen render elements. In this wiki, we used Fusion as our compositing software, but you can substitute Photoshop for it along with the appropriate Photoshop blending mode:
https://planetside.co.uk/wiki/index.php?title=Compositing_Terragen_Render_ElementsTo help you understand "all" the render elements, think of it like this. A normal render from Terragen outputs a "beauty pass"; that is, all the terrain, objects, atmosphere, lighting, etc. are taken into account and create the final image. Render layers allow the user to assemble these separate element back into the beauty pass.
The Render Layer window is divided into 3 sections. Each section allows the user to break down the render layers into more specific elements. For example, to recreate the beauty pass from Terragen, all you really need to start with is the SurfaceRGB, CloudRGB, and AtmosphereRGB render elements. If your combine these three render elements on top of each other in an additive mode, you'll get the beauty pass. This allows the user to modify each render element as they see fit. Perhaps changing the colour saturation of the SurfaceRGB element, or increasing the brightness of the cloud element, etc.
You can go deeper too, and that's what the second section is for. Here you can break apart direct lighting verses indirect lighting. All you need to do to recreate the "full" lighting is combine the two elements back together in additive mode.
The third section, the Data section, allows you to export other types of data such as zdepth, etc.
So for your project, think about what you might want to have control over in Photoshop.
My approach would be something like this. I would save a tiff file from the renderer's Output Image File param. This would give me a beauty pass with all the Terragen tonemapping and how I expect the final composited render element to look. If I thought I would only need to breakdown the render into "basic" parts, on the Render Layer's Render Elements tab I would enable the checkboxes in the first section. If your Terragen project has no clouds in it, you don't need to enable CloudRGB and CloudAlpha.
If you want to render your trees against a black background, group the tree objects together in Terragen, then assign the group to one of the Object groups under the Render Layer's Object tab. Set the group's render mode to Visible and enable Cast Shadows And Other Rays. Set the All Other Objects render mode to invisible, but you may need to enable their shadow casting and other rays, if they have an effect on the trees. For example, the buildings in the photo casting shadows on the trees.
One last note, if saving render layers in EXR format, Terragen's tonemapping will not be embedded into the EXR images. That's why I save the output image, in order to have a reference to how I want it to look.
I would be curious to watch the progress of your shot on the forum. Don't hesitate to ask questions, we're happy to help!