Current versions of Jira/Confluence
Based on changed APIs by Atlassian, external gadgets are no longer supported. In consequence of this, the approach described below no longer works and traffic-light fields' content will not be rendered properly.
Instead, you can use my app "Integration of Jira fields into Confluence" (https://marketplace.atlassian.com/apps/1221429).
Beside rendering of Jira fields including Traffic-Lights, you have also the advantage of specifying a Time Machine to use the field values as of <date/time>:
that's really helpful in case of e.g. reporting to always display the same historic value for a given timestamp.
For more details, please have a look on the app's documentation: Jira Fields in Confluence
Older versions of Jira/Confluence
You can easily integrate your Jira issues into Confluence, but using the standard approach does not render your custom fields and just display their internal data as shown in the first section of the sample screenshot below.
In order to properly display traffic-lights in Confluence, please put an external gadget of a related Jira "Filter result" on your Confluence page as shown in the second section below: if you are not familiar using external gadgets in Confluence, please have a look into Atlassian's documentation on how to do this.