How to create individual shaped tunnel by using a curve?
You can do this by using a square shaped bezier circle (no oxymoron here as you'll soon see):

First add a bezier circle (Add --> Curve --> Circle)


Then go to edit mode (Tab), select all the control points (A), then press V --> Vector, to make all the corners sharp.



While still in edit mode, rotate the circle along the Z axis by 45 degrees (R --> Z --> 45 ).



Now use this circle as a bevel object for your tunnel curve:


Scale the circle (S) to adjust the size.

You can manipulate this circle to change the shape of the tunnel's profile whichever way you'd like.