You use acceleration due to gravity in problems that involve anything falling,
or anything with any vertical motion.
You do not need to consider acceleration due to gravity in problems where
all of the motion is only horizontal AND friction is not involved.