We can rule out May, because Albert said he didn't know when Cheryl's birthday was, and neither did Bernard because there is no unique day in that month, and if Bernard was told May 19 then he would immediate know that was the date.
We can also rule out June, because if Bernard was told 18 he would know it was June since only June has that possible date.
So, we are left with either July or August. But Bernard says that now he knows the date, so it couldn't be 14 or else he would not know if it was July or August. That leaves 15, 16, or 17 as the only possible dates.
But Albert says that now he knows Cheryl's birthday too. But if it was August then he still would not know if it was the 15th or 17th. So that means the only possible date left is July 16.