You can earn an Open Data Badge from the Center for Open Science when you share your data openly -- display it alongside your journal article or on your personal website.
Sharing your data can be very beneficial, but if you have sensitive data, such as human subjects' medical data, you will need to take precautions. Even if you can anonymize the data, it may still be too sensitive to be shared.
There are a variety of tools and resources available to share your research data.
Post data on a project website - Open Access, Broad dissemination - this option requires regular maintenance and there's no control over who can access your data.
Submit to a data journal - Data will be associated with the published work - but depending on the publisher access may be restricted to those who subscribe to the journal.
Individual Data Requests - By making data available upon request you retain control over who has access to it - but it can be a time intensive method and may not be an acceptable to your funder.
Deposit data in a repository - Whether it is a discipline or subject specific, general, or institutional data repository this can be a good method for making data freely available, complying with funder requirements, and this option requires no ongoing maintenance by you - but you cannot control who accesses data.
Increase your research impact
Sharing your data enables wider dissemination of your research,
Increase Citations
Your article may be cited more if the underlying data is accessible.
Meet grant requirements
Many funding agencies now require that researchers share the data collected for a funded research project.
Preserve your data
Depositing your data in a data repository protects your research time and preserves your research contribution for you and others to use.
Maintain Integrity
Managing your data throughout its life cycle will ensure that you and others can understand and use the data in the future.
Promote new discoveries
By sharing your data you provide a catalyst for discovery and support future innovations.
When you should share your data depends on the type of research, discipline, and funding agency requirements. Most funding agencies require sharing data in a timely manner.