Disable Power Saving Mode
If the Wi-Fi connection you are trying to connect to is weak, your PSP may not be able to reach it when it is in its default power saving mode. Try to connect again after disabling the power saving mode. To disable, go to the "Settings" icon on the left side of the XMB. Then scroll down and find the Power Save Settings icon and and press the "X" button. Then find WLAN Power Save and select "Off" from the sub-menu.
Reconfigure Wi-Fi Settings
If you are using a home or personal network to which you have administrator access, you can try reconfiguring your Wi-Fi settings so that they are optimized for use by your PSP. If you are using a password-protected network (using WEP or WPA security) try shortening the network key so it is easier to log on with the keyboard-less PSP. If you have a strict firewall program, you may need to add your PSP's MAC address to the "allowed" list. To find your PSP's MAC address, go back to the Settings icon and then select "System Settings" with the X button. Then select "System Information" to show your MAC address.
Congested Network
If you have a lot of devices/computers actively connected to the wireless network which you are trying to join with your PSP, the connection may fail due to a congested network. Wait until there are fewer devices using the network and then try to connect with your PSP again.