^I think it's only been the style of the show for the past two seasons (including the current one). The first two seasons weren't as prone to goofiness. Castle was imaginative and playful with his theories then, but it wasn't until season 3 that he started being written as a credulous man-child who'd spin theories about psychic powers and UFO abductions and the like as if he actually believed them.
I don't think Castle believes his whacky theories at all.. he just utters them to annoy the others and have a bit of fun. This is his character but when it comes down to it and it gets serious he adapts and gets a bit more mature (if only for a second).
In this he's written consistently and it's also why i like the character so much.