Metal and rubber dumbbells essentially function the same. The best one for you comes down to personal preference and budget. Rubber-coated dumbbells tend to cost a little more than those without the protective coating, so that’s a factor to keep in mind.
That said, the rubber coating can help protect floors and furniture from scratches and dings that are more common with metal (typically iron) dumbbells, and they can even help prevent the dumbbell itself from being damaged. That said, rubber-coated dumbbells often emit a rubbery smell that can be off-putting. This can be exacerbated if the dumbbells are stored in a sunny area and the coating begins to break down.