It's not bad, just very informal. You can use it amongst your friends if you're younger, but definitely don't call your boss "dude." If you're forty and calling people "dude," it could sound weird; it would make your English sound a little immature. It's not a swear word or something that's necessarily insulting, though.
It's very North American English, I think; I've never heard a British person call someone "dude." And people from some areas of the U.S., at least, use it more than others.