To avoid author disputes, I have added the guidelines for authorship on a paper in the computational atmospheric chemistry group. In general, we follow the Vancouver Guidelines for Authorship, which state:
1. Substantial contributions to the conception or design of the work; or the acquisition, analysis, or interpretation of data for the work; AND
2. Drafting the work or revising it critically for important intellectual content; AND
3. Final approval of the version to be published; AND
4. Agreement to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.
An author must fulfill these four criteria. As mentioned under point 1, if a student is involved in a project and have contributed to either the collection or acquisition of research data they are entitled to be added to the paper. In the computational atmospheric chemistry group we find it best practice to extent this formulation to also include data that are either re-analysed or for some reason does not end up in the final version of the paper. If you are in doubt whether you should be on a specific paper, don't hesitate to ask.