The good thing about hot glue is that it is relatively inexpensive and can be easily removed from most surfaces using rubbing alcohol. You are not going to find a hot glue stick that is designed specifically for gluing ice maker trays back together, so you will need to improvise. Opt for a nontoxic glue that is indicated for all-weather use. It will likely contain silicone.
You want to remove the ice maker tray from the freezer and secure it in such a way that pressure can be put on the joint that you are gluing. If the tray is cracked down the middle, consider using a large rubber band to hold the tray together. An adjustable work bench or large clamps will come in handy for this task.
Using your hot glue gun, run a bead of glue along the length of the crack on both sides of the break. Force the two pieces together and hold them until the glue cools and dries. If there is glue protruding into an area where ice will form, use a razor blade to carefully remove the offending material and cut the glue back flat with the tray.
After the glue has hardened, place your ice maker tray back in the freezer and allow it to fill with water. Check for any cracks or leaks, and repeat the previous steps to glue any remaining openings back together. You will need to be gentle when handling the tray in the future and may need to redo this fix, as over time the hot glue will become brittle.