An empty plastic bottle floats, while a plastic bottle filled with sand sinks in water because
density of empty plastic bottle is less than density of water
The gravitational pull on the empty plastic bottle is equal to the upthrust exerted on it by the water. In other words, its density is less than density of water, therefore, it floats. On the other hand, a plastic bottle filled with sand sinks as the gravitational pull on it(weight) is more than the upthrust of water.