Open a new document as 4px by 4px, and make the background transparent. Zoom in to 1600%, which is the max you can go.
Using the Rectangle Marquee tool, hold down shift and select the areas shown below, or do something similar to it:
Once you've done that, right click ) fill
Content:
use: color (make the colour whatever color you want the lines to be).
Blending:
Mode: Normal
Opacity: 100%Then click OK.Now click the magic wand tool, and click the black parts that are highlighted. It should now go solid.

After you have done all that, click edit ) Define Pattern
Call the pattern whatever you want to call it, the name dosen't matter.

You can now use your pattern over an image, or by itself!

To do this, use the Rectangle Marquee Tool, and click Ctrl A.
Right click ) Fill.

Then fill in the details as below:

Your finished product!

Once a pattern is saved, you can just skip straight to adding the effect to your image. You do not need to re make the pattern, unless you want it in a different colour.