In illustrator do this (see footnotes for InDesign changes):
Draw a line with the line tool
Select the line and right click on it and choose Transform → Move...
In the vertical slot type how much you ant each line separated. Then hit Copy.
Hit ctrl + D† to make a third line (with equal spacing).
Color the strokes and apply dashing in the stroke palette.
select all and chose rmb menu→ Transform → Move... again
It should remember your previous value, type 3* before the measurement and hit the Copy button (do not press enter).
Hit ctrl + D† repeatedly until you have enough lines.
Ammendum
What should the gap be? Locally it is easy to come by paper with a grid size with gaps of 15, 10 and 7mm‡ (and also 5mm but not used in local schools). So invariably its a good idea to make the grid match these. There is however some considerable variation region by region. And even generation to generation.
Check your local school plan for the ideal in your region. what is considered best varies country by country.
† in InDesign use alt+ctrl+4
‡ 7 mm being roughly half of a 15 mm