hey most probably It it might be an issue of static IP:
find the detailed solution here: reference link
Or you may find this video helpful : youtube link
As I stated The reason might be Static IP, which is a new feature introduced in the LUMIA CYAN update with windows phone 8.1.
So you will have to turn off static IP, possibly if the settings does not match the particular default gateway your are trying to connect.
You can find the detailed description in the links given.
The blog has some more reasons mentioned in the article, but mainly this is the major issues concerned with the phone, other reasons are related to router and internet.