Current flow in AC vs DC
A battery is not naturally connected to ground/earth on its negative terminal. If it were then you would make a circuit and the bulb would glow (should it compatible with 12V).

AC on the other hand, tends to have its neutral wire grounded at some or several points in the power feed system and this means that a circuit is completed when you ground the bulb.