I rarely use Wifi to connect a computer running a Unix-like OS to a network. Maybe if I did, I would have long ago learned of the nuisance of wifi power management on hosts running network services.
So you setup your Raspberry Pi, it's connected to wifi, and everything is swell. You go to lunch. Then you try to SSH, only to find that the host is unresponsive. It's not even responding to pings!
You need to turn off wifi power management. Here's some references on how to do this:
Some additional reading I came across that looks interesting: