1. If the ball drops on the floor, the person sitting closest to the ball should pick it up.

2. If the ball drops onto the floor, the person sitting closest to the ball should pick it up.

3. If the ball drops to the floor, the person sitting closest to the ball should pick it up.

[Are the sentences all grammaticla? Which preosition do we have to use, on, onto, to?]

All sentences are fine.

You have your choice of prepositions. They all work well in this context.