Put an open-source copyright/copyleft license on your code, look for example for GPL version 3, or other open-source license (wikipedia is a good source for various variants. The nuances regarding what's permitted and prohibited under
different licenses is too complex for me to advice on.). Tar/zip everything up and make available, consider using git-hub or similar, I really like to find stuff at the matlab central file exchange, so in my opinion that is a good place for others to
make their code available. On that part there is not that much more to it.
Then I always find tools with good documentation, examples and integrated help-facilities very important for me to use tools. You might benefit from making sure your tool has as low an entrance-threshold as you can make it.