We know that,
Vertical component of earth's magnetic field is
$B_{v}=B\, \sin\, \theta$
and horizontal componet of earth's magnetic field is
$B_{H}=B \,\cos \,\theta$
Given, $B_{H} =B_{V} $
So, $B\, \cos \,\theta =B \,\sin \,\theta$
$\frac{B \,\sin \theta}{B \,\cos \,\theta} =1 $
$\tan \,\theta =1 $
$\theta =45^{\circ}$