Sometimes, even when the light is perfect it isn`t quite magical. But you can spruce it up a little bit to create that much-desired “rays of light” effect with Photoshop. Here`s how! Please note, this technique will only work if your image has the sun visible in it:
How To Add Sun Rays Effect with Photoshop
1. Import the image into Photoshop and create a New Layer.
2. Select the Brush tool. Next, sample a color that is close to white but not quite completely white. The color you pick should ideally be sampled from close to where the sun is-a color that is bright yellow bordering on white.
3. Create a number of small dots across the image by clicking on Window > Brush to open the Brush tool dialog box. Check Shape Dynamics. Bring the Size Jitter all the way up to 100 percent. Then bring the Minimum Diameter down to 0 percent. This ensures that you have a really wide range of dot size.
4. Next click on Scattering. Check Both Axes. Bring the slider all the way up to 1000 percent to create a large scatter of the dots.
5. Start painting with your Brush tool. Paint a wide area of the image but concentrate a majority of the dots around where the sun would be. The goal is to make the final image look as natural as possible. You can drag the Spacing under the Brush dialog box to increase the space (scatter the dots even more) between the dots.
6. This is where the random scattered dots become rays of light presumably emanating from the sun. To achieve this effect. Go to Filter > Blur > Radial Blur.
The option you need to select under Radial Blur is Zoom.
Once Zoom is applied, image looks like this:
You can experiment further by creating a second layer, this time using smaller dots to create thinner lines and then blend the two layers together to produce a slightly more realistic effect. The final touch is to transform the layer that has the light rays and align the converging point with where the sun is in the background layer.
( Source )