Making a Molex Connector
The picture above shows a 22 AWG stranded wire soldered to a female Molex terminal pin (Molex series KK 2759, part number WM1114CT-ND on digikey) about to be inserted into a Molex 5 position connector housing (Molex series KK 2695, part number WM1578-ND on digikey). Normally you would crimp the wire into the terminal using the proper tool (e.g., an HT-202A tool; see here for more on crimping), but sometimes it is easier to just use a pair of pliers to squeeze the wire into place and then put a dab of solder to make the electrical connection and hold the wire. Make sure the solder dab doesn't prevent the springy end from pushing down. Then insert the terminal into the connector. (There is only one orientation for the terminal for proper springy mating with male pins coming in the connector, as shown in the photo.) Push the terminal pin in all the way until it snaps in place.
The terminal pins may come on a roll. Break them off one by one, and cut away with snippers any remaining material used to hold the pins together. The springy pins shown above make for a female Molex connector.
You can see a completed cable in the picture below. You could use ribbon cable instead of individual wires, to make a neater cable.