Crystals can be dedicated to the purpose for which you wish to use them. This means that the energies of the crystal can be focused for the highest good. This should be done after cleansing and charging.
To program your crystal you should sit with it in your hands for a few minutes. Then visualise a light surrounding the crystal. State that the crystal is dedicated to the highest good of all who will use it and then state clearly your intention for the crystal. Be as specific as you can. For example, if you are seeking healing then say precisely the condition that you wish to be healed and what you want to happen. However, do ensure that you are asking for the correct outcome and that you have the correct crystal for the purpose.
You can state the intention several times to anchor the intention into the crystal.
Here is an example of what you may wish to say when programming your crystal:-
“This crystal is to be used in light and love. I dedicate this crystal to the highest good of all and I program this crystal for [your purpose]”