Decide how tall you want your hats to be. You can use the entire sugar cone, or you can cut it to your desired length. Use a serrated bread knife to gently cut the cones. (I cut about an inch from the opening.)
Melt your black candy melts. (You could also use chocolate, or use chocolate and use black candy color to tint.) Place melted candy in a deep bowl, so that when you dip your cones, as much of them is covered as possible.
Hold the cone, point side down, with your fingers inside the cone. Dip into the melted candy, using a spoon to help you coat the sides all the way to the top. Gently tap off the excess candy and place, open side down, onto a rack set over a cookie sheet. Place in the refrigerator to harden.
While the tops are hardening, make the brims of the hats. Find a circle the size you wish to use (I used a round cookie cutter) and trace circles onto waxed paper with a pencil (one for each hat you are making). Turn the waxed paper upside down onto a cookie sheet, so you can see the pencil marks but they are on the underside of where you will pipe the candy.
Place melted candy melts (leftover from the hats) into a ziploc baggie and snip off one corner. Slowly trace your circles with the candy, and fill in the centers. Tap the cookie sheet slightly to make the candy even. Place in the refrigerator to harden.
Once the hats and brims are hardened, get ready to assemble them. Fill the hat with small candies, like candy corn. Flip the brims upside down (the bottoms will be flatter than the tops). Hold the filled hat in your hand and trace the edge with the melted candy (what’s left in your baggie from making the brims). Quickly press into the center of the brim, and fill around with more candy if needed to fill gaps. Use your finger to smooth any excess candy.
Unroll a fruit roll up. Slice 1/4” strips and wrap around where the hat meets the brim. Press to seal the ends together.
Tint your frosting green (or whatever color you wish) and frost your cupcakes. Place a witch hat on top of each one.