Ion Optics: Electric and Magnetic field. A comparison with Light Optics When we compare ion optics with light optics, normally we consider electric field. For example Snell's law. $n_1\sin\theta_1$=$n_2\sin\theta_2$. When an electron move from one electric potential to another, its tangential velocity remains the same and so we can write $v_1\sin\theta_1$=$v_2\sin\theta_2$. By the law of conservation of energy, velocity is proportional so square root of electric potential so we can write $\sqrt{V_1}\sin\theta_1$=$\sqrt{V_2}\sin\theta_2$.
My First Question is: Can we do the same in magnetic field as well? If I say, the velocity of electron in a magnetic field is proportional to the magnetic field strength, can I write the same equation for an electron entering from one magnetic field to another as $B_1\sin\theta_1$=$B_2\sin\theta_2$ ? Is this right? But I never seen in any ion optics textbooks saying this or at even referring to this! 
Second question: To guide the ions/electrons, we use electric fields most of the times. Magnetic field also can do the same. But mostly people use magnetic field only in case if mass separation is needed (mass spectrometry). Other cases to guide the ions/electors we use electrostatic lenses. I understand that it is the convenient way. But I didn't understand the real basic reason why electric field act more like an optical lens. What is the basic property of the electric field which make it more close to light optics when compared to magnetic field?
 A: Ion lenses (either of the electrostatic or magnetic variety) typically all have something in common: the fields are such that particles which are off-axis are more strongly bent towards the axis, and particles that are on-axis remain unaffected.
Using electrostatics, this is most easily achieved using an Einzel lens.  This is a lens that consists of two or more cylinders laid end-to-end with gaps in between.  Each cylinder is biased at a different potential, and this results in fringe fields with a radial component (so when particles move from one potential to another, there is in fact a transverse field - it's small but effective).  
Using magnetics, this can be achieved by generating an azimuthal magnetic field in a cylindrical geometry that is stronger as one moves off-axis. The $v \times B$ motion of particles that are off axis is such that they are bent back towards the axis.  Such fields are often generated using a magnetic quadrupole.
As to your second question, I'm not aware that people prefer electrostatic lenses to magnetic quadrupoles.  In my experience, any preference to electrostatic lenses is largely due to practical considerations (cost and size). 

See Einzel lens: http://en.wikipedia.org/wiki/Einzel_lens
See Quadrupole:  http://en.wikipedia.org/wiki/Quadrupole
A: Well the derivation of the Snell's law in optics can be done by using Fermat's principle of least time, have a look at Feynman's lecture series volume 1. You can derive an analogous equation for charged particles using the principle of least time by using the potentials in two consecutive areas ( which take the place of the refractive index) this is will give us the equation $$ V_1 Sin \theta_1 = V_2 Sin \theta_2$$. Because the Force is simply $$ F =q E $$. And the potential is simply $$ V =  \int(E.dr) $$However you may recall that for magnetic fields  can have both scalar and vector potentials and moreover the bending happens in the perpendicular direction as for magnetic fields the force is $$F = q(v \times  B)$$. You can try to derive an expression but I am sure it wont look like Snell's law and it would be be much difficult to do it compared to the electrostatic lens. It would be an interesting exercise which I would like to try sometime.
