You're correct that the vertical component of Newton's second law should be
$$\sum F_y = ma_y$$
You set $a_y = 0$ because the block is not flying up off the table. This is implied by the wording of the problem: usually blocks are assumed not to be flying up off their tables unless it is explicitly stated that that is a possibility. Plus, the fact that they ask for an apparent weight suggests that the block is staying against the surface it sits on.
However, you can also show that the block stays on the table if the diagonal force is $15\text{ N}$. To do so, you use the rule that the normal force will be as strong as it has to be to cancel out the forces pushing the block against the surface.
In detail, you add up all forces acting on the block other than the normal force, which in this case gives you $F\sin\theta - mg$. If this "subtotal force" is directed into the surface, the normal force will have the same magnitude but will act away from the surface, so that the net force including the normal force is zero.
$$N + \sum_\text{other} F_\perp = 0$$
On the other hand, if the "subtotal force" is directed away from the surface, the normal force will be unable to counteract it. In that case the normal force will be zero, and there will be a net force on the block. Since net force equals acceleration, you can then conclude that the block will have an acceleration perpendicular to the table, i.e. it will fly up off the table.
In short, the status of the block's motion and the normal force depends on the sum of the other forces:
- $\sum_\text{other} F_\perp$ acts toward surface: $N > 0$, no motion
- $\sum_\text{other} F_\perp = 0$: $N = 0$, no motion
- $\sum_\text{other} F_\perp$ acts away from surface: $N = 0$, motion away from surface