Why is internet switched off when switching 2G/3G? I have a stock Android 4.2.2 on Galaxy Nexus, so I think this can be related to all Android phones. When switching from 2G to 3G and vice versa internet connection is switched off for a few seconds, even though when I browse in 3G I can connect to EDGE and GPRS too: why does this happen?
The radio frequency of a 2G radio operates in the range of 900 and 1800 MHz (source)-  varying from country to country.  The radio frequency of a 3G radio operates in the range of 2100 Mhz (source).

As far as Samsung Galaxy Nexus LTE L700's specification is concerned, the 2G frequency is CDMA 800 / 1900, 3G frequency is CDMA2000 1xEV-DO and LTE (4G) frequency is LTE 1900.

As far as Samsung Galaxy Nexus I9250's specification is concerned, the 2G frequency is GSM 850/900/1800/1900, 3G frequency is HSDPA 900/1700/1900/2100 and LTE (4G) frequency is LTE 2300/2400.

The above examples clearly means that the phones use different radio frequency for each type of network and hence when switching from one to another it goes into no network mode momentarily and hence the data connection stops.