Suffered the same thing, I would be outside on 3G/2G/Edge, walk in to work or home, the phone would pick up the Wifi as it would show connected in Settings > Network > Wifi and it would show the phone obtained an DHCP address fine, but the icon in the top left next to 02-UK would stick on Edge/3G and never move on to the WIFI icon, and all internet traffic would route via 2g/edge/3g instead of wifi, and low and behold it wouldnt fix itself until I rebooted the phone.
Turned out to be SBSettings (a JB App) that was causing mine. After uninstalling it, my issue went away. I have just done a fresh install of 4.2.1 on my iPhone 4 and have put the new SBSettings on, so fingers crossed it wont happen again. It would be a shame if it did though, as SBSettings has got to be one of the most useful JB apps out there!