This is a very important question. Of late this has been a very hot topic on university campuses. And as various countries come together through exchange programs, the question of ethics really does come to the fore, because each country has different standards. Finally, this is a very broad topics. So, I will only comment on a few points.
First, one of the most important points to keep in mind is the importance of crediting people for their insights. In other words, it is important to know what is plagiarism and not plagiarism. It is too easy to steal the work of others and present them as your own. Hence, there must be a strong code of ethics here.
Second, when communicating to each other, there must be a level of civility, even if there is strong disagreement. Professors are looked up to and so they must set an example in this area.
Finally, with the advent of the Internet, almost anything that is published is public. So, this requires additional care. In short, do not email or make anything digital that you want to keep private.