This is the order in which I believe the games take place:
1. Alien Hominid
2. Battle Block Theater
3. Pit People
4. Castle Crashers
Alien Hominid and Battle Block Theater happen at around the same time in the modern era, because when Hatty shoots a laser into space he also blasts through the Alien, and the Alien is blasted off in that same ship at the end of Alien Hominid. Then Honey Hug smashes into Earth causing the apocalypse and all these crazy mutant monsters like hair trolls and cyclopses. Castle Crashers is the survivors of the apocalypse trying to rebuild, which explains the crazy monsters that exist like trolls and fire demons and skeletons.