Yes, you can paint castings, but you should plan ahead to make sure you make it as easy as possible.
You should plan on using a silicone rubber mold to cast the parts so you don’t need to use a release agent. Release agents will leave a residue on the cast parts and can make it difficult to get the paint to stick.
If you have used a silicone rubber mold, just wipe off the castings off with a dry cloth to remove any residue from the silicone. A light sanding with a very fine sand paper if possible will always provide a better surface for paint adhesion. Apply a primer paint and be sure to let it dry AT LEAST 24 HOURS before sanding or adding a final paint color. Many primers will dry to the touch in an hour or so, but they have not formed a good bond to the plastic and will easily scratch off. Ideally you will let primer dry for a couple days to get the best bond.
For ideal primer bonding, consider primer painting the inside of the silicone mold if possible before casting the part. Let the primer surface dry a little bit before pouring the resin into the mold. Now the cast part will pull out of the mold already primer painted. A light sanding and final primer coat will make an ideal surface for painting.
If you already have a polyurethane rubber mold, you will need to use a release agent to prevent the casting from sticking to the mold. The best release to use in this case is Pol-Ease® 2500 Release Agent. It will wash off the casting easier than many other releases. Use Dawn dish washing crystals and water with a brush to thoroughly scrub and wash the castings. Solvent washing should be avoided as this may damage the casting. After the casting is washed off, a light sanding with a fine sand paper if possible will help tremendously.