It is both a dear person who you address to regularly, so you call it "güey" over and over, instead of using its name each time, like "dude" in english, or a person you consider not to be trustable, because it lacks of the cleverness, wisdom, or experience needed for a certain task, like an "asshole", in english. It is the right spelling in spanish for the mexican expression "wey", from which you will find similar definitions to the one I just wrote.
In case of endearment:
¡Qué onda, güey! - What's up, dude?
Sí, güey, está cabrón, güey, ya le dije, güey... - Yes, dude, it's all fucked up, dude, I've allready told her, dude...
In case of mistrust:
Nel, a ese güey no lo quiero en mi equipo - No way, I don't want that asshole in my team