No, they are not related at all. They just happen to both be reptiles in the same Mushroom Kingdom ecosystem.
Yoshi is a dinosaur, a friendly one with a long tongue and an appetite for fruit. Dry Bones, on the other hand, is a reanimated Koopa Troopa, basically the skeletal remains of a turtle-like enemy that reassembles itself every time you stomp it flat.
Different species, different behaviour, different alignment. Any resemblance is coincidental.