A Welsh form of David [as is Dafydd], from Hebrew "beloved".
Dewey is possibly a US English respelling of Dewi but this is by no means certain.