There’s a lot to Wi-Fi parameters, settings and such that can cause problem for you to connect or get Internet access via your Wi-Fi connection. Here are a couple of things worth checking if you're having troubles with your Wi-Fi connection.
First of all begin with reboot both your phone and router.
If connection problem still remains make sure that both phone and router is running on the latest version of the firmware. You can use PC Companion to check for software updates for your phone.
If you feel insecure on how to update your router firmware, contact your router manufacturer.
Still having connection problems?
Check these router settings:
Network mode/ speed: Try setting this to auto or mixed mode instead of b,g or n.
SSID and password: Make sure that none of these contains any special or extended characters.
DHCP: Should be turned on. You could also try setting a static IP if you're having troubles getting Internet access via your Wi-Fi connection.
Mac-Filter: Should be turned off, or make sure that your phone is set as allowed.
Channel: Try using another channel, preferable 11 or lower. Note that due to legal reasons channel 12,13 and 14 is not available in all countries.
By using the application Wifi Analyzer you can check what channel that would be best for you to use.
https://market.android.com/details?id=com.farproc.wifi.analyzer&feature=searc h_result#?t=W251bGwsMSwxLDEsImNvbS5mYXJwcm9jLndpZm kuYW5hbHl6ZXIiXQ
If you feel insecure on how to change the parameters above check your router support documents or contact your router manufacturer.
If none of the tips above would help, you should try to connect to another network to see if it works.