Licensing
In general, you will have to check with your institution / employer if there are any requirements or limitations for releasing software and code that you develop. This especially applies to licensing.
Open Source licensing
To maximize possibilities of code re-use, which should be the default in research, Open Source licenses are the best choice. For quickly deciding on an Open Source license for your project, use the interactive tool at choosealicense.org. For a comprehensive list, check out the Open Source Initiative's community-approved Open Source licenses.