We went through this in a comment chain herehere, the highlights of which are:
The models are equivalent in terms of the estimates and the wald statistics, because the information encoded in these two ways of representing the same data is exactly the same
In the first model, you've set it up as only 2 binomial measurements (grouped by the two values of a single binary predictor). So, the observed frequencies can exactly match the modeled frequencies (i.e. your model is saturated), so the residual deviance is zero. Any model that has a different response value for each level of a categorical predictor will (trivially) fit perfectly.
That phenomena is not possible in the binary case unless you have complete separation, because the fitted probabilities will never be exactly 0 or 1, which is why the residual deviance is not zero there.
In terms of which model to use... You should analyze the data as it arose in the first place, so if each of the outcomes are single binary measurements from different people, analyze it as binary data. But, for example, if each person did ten tasks and you measured the number of successes out of ten, then model
cbind(y,10-y)
as the outcome. In your case, it seems like single binary outcomes for distinct units (only you know for sure), so you should probably analyze it that way.