Open the picture you wish to place a rainbow within. A good scene has clouds that are receding into the distance and the light angle coming in from the front of the scene. A rainbow effect appears when by the sun is shining from behind you into the mist-filled air where it is refracted by raindrops.
Create a new layer using the layers palette. If the layers palette is not displayed, select "Windows" from the menu bar at top, then "Layers."
Select the gradient tool, which is underneath the fill tool in the default tool box display bar (the one shaped like a paint bucket), as pictured here.
From the pop-up menu for the gradient tool, select "Transparent Rainbow" from the bottom row of swatches as in this screenshot.
Use the gradient tool to draw a thin gradient band on the new layer you created. Place the tool cursor in the middle of the picture window, click, hold and drag a short distance upward. The gradient should be a thin horizontal band. If it is too thick, select the arrow selection and scale it down by clicking and dragging on the edge of the bounding box.
Select "Filter" from the menu bar at top, then "Distort," then "Polar Coordinates." Your gradient bar will form into an ellipse. Use the arrow selection tool to shape the ellipse into a circle by clicking and dragging on the edges of the bounding box.
Scale the circle so that a section of about one-third of it will arch across the sky. Move the rainbow into a position that looks visually appealing.
Use the rectangular selection tool to outline and select the portion of the circle that you don't need. Delete that section.
At the top of the layers palette, lower the opacity of the rainbow's layer to 35%.
Add a slight blur to the rainbow by selecting "Filter" from the menu bar at top, then "Blur," then "Gaussian Blur." Set the value at 2 pixels.
Finish by erasing away the end of the rainbow if you wish to have it disappear behind a feature of the landscape.