choose a license is an easy to use site that walks users through the selection process:
Quoting from the site, If you really don't want to hold any patent or you just want to hold a simple licence you can go ahead with MIT licence.
The MIT License is a permissive license that is short and to the point. It lets people do anything they want with your code as long as they provide attribution back to you and don’t hold you liable.
If you want to hold any rights to your code you can use the Apache Licence.
The Apache License is a permissive license similar to the MIT License, but also provides an express grant of patent rights from contributors to users.
If you think anyone can improve your code and distribute the newly created work, you can select the GPL licence.
The GPL (V2 or V3) is a copyleft license that requires anyone who distributes your code or a derivative work to make the source available under the same terms. V3 is similar to V2, but further restricts use in hardware that forbids software alterations.
There are more licenses available such as Creative Commons etc.