Personally, I would avoid taking a position at a company that has plans to, or has recently done, a substantial layoff. But YMMV. It all depends on what your risk tolerance is.
Beyond risk tolerance, companies post-layoffs are miserable places to work. Emotions are high, moral is low, and work piles up. Whatever "company culture" is boasted during interviewing is not going to exist if you take the job.
And being the guy that just got hired after everyone's friends/coworkers were laid off... That cannot be a great way to start a new job.
I had this happen to me once. Between when I accepted the offer and my start date the company had a 10% layoff. I pretty much got the cold shoulder the moment I walked in the door and it was a pretty miserable experience. I only stayed at that company about 4 months before I had enough and moved on.