Castle's film credits include Dark Star where he played the beach ball alien, Major Payne, Dennis the Menace, The Last Starfighter, and Connors' War as a director. He wrote the screenplays Escape from New York and Hook. He was the writer and director of the film Tap.
He played Michael Myers in the 1978 horror classic Halloween, directed by former USC classmate John Carpenter, being paid $25 a day. Castle's subsequent collaborations with Carpenter included his name being used as one of the main characters' names in The Fog, co-writing the script of Escape From New York, and performing the title song of Big Trouble in Little China as part of the band Coup de Villes, alongside Carpenter and another friend, Tommy Lee Wallace.
Castle's most recent project is the screenplay for August Rush, a musical-drama directed by Kirsten Sheridan and starring Freddie Highmore, Jonathan Rhys-Meyers, Robin Williams, and Keri Russell, released in 2007. He also stars as himself in the 2010 documentary Halloween: The Inside Story by Filipino filmmaker Nick Noble.
Castle won a Saturn Award for Best Writing for The Boy Who Could Fly, a Silver Raven (for Delivering Milo), a Grand Prize (for The Last Starfighter), a Bronze Gryphon, and a Gold Medal of the Regional Council.