Sand:
If it's buried don't expect too much. If it's not and the face is not too high you can still get a reasonable shot off by hitting it harder and maybe increasing the club depending on bunker face. It's really practice.
Rough:
Punch shots can be very effective as can just using a club up. Again it's experimentation and practice that will help you most in the end.
Obviously landing in the rough or sand happens and as WGTIcon eluded to above I think course management also plays a huge part. If you are in DEEP rough just getting it back on the fairway (taking the medicine so to speak) may be best!