The force is greatest when the wire is perpendicular to the magnetic field.
In fact, the expression for the magnetic force is

where I is the current, L the length of the wire, B the magnetic field intensity and

is the angle between the directions of I and B.
We can see that F is maximum when

, so when

, so when the wire and the magnetic field are perpendicular to each other.