MBP Connected to WiFi but won't connect to Web
I've asked some questions to help debug as a comment, but this is what I would try:

1) Turn off all extensions in Safari (Safari menu -> Preferences -> Extensions)

2) Rule out DNS issues - try to ping a site. Open Terminal (in Applications -> Utilities). Type in:

ping google.com


You should get something like:

⇒  ping google.com PING google.com (173.194.43.39): 56 data bytes
64 bytes from 173.194.43.39: icmp_seq=0 ttl=251 time=7.462 ms
64 bytes from 173.194.43.39: icmp_seq=1 ttl=251 time=6.895 ms
64 bytes from 173.194.43.39: icmp_seq=2 ttl=251 time=7.991 ms


So, take the IP (173.194.43.39), might be different for you, and put that into Safari, see if that works. 

You can also just try the IP above as well. If Safari works with the IP, then the issue is DNS.

3) Using Terminal again, try curl:

curl www.google.com


If you get a lot of code back, it's fine, and your issue is purely Safari.

4) Try a different WiFi network
5) Try a different device on your WiFi network
6) Try a different browser if you have one