Anything that is loose must be removed. If it is actual paint and not a stain, pay attention to feathering the paint edges with a sander so everything looks better.
In most cases a stain is better for decks, it won't peel making maintenance easier. You could use an oil based solid color deck stain. The only time paint is used is on a T&G covered porch where it can have some protection and this is an oil based porch and deck paint. Never use standard latex house paint, it will peel horribly in just a few months or sooner.