In the first episode of the series Becket tells Castle: "Out here, we find a guy standing over a body with a gun he's usually the guy who did it." Years later, in this episode, she finds Castle doing exactly what she described, standing over a body with a gun. It turns out it was one of the exceptions to her rule.
Detective Ryan looks at the cardboard cutout of Castle in a shop window and remarks that "he really is ruggedly handsome." This is in reference to the first season Always Buy Retail (2009) when Castle makes the same remark of himself also in a shop window.
Esposito tells Beckett that Ryan is trying to balance an egg on its tip because it's the autumnal equinox, which is a unique time of the year that affords the possibility of doing so. This is an "old wives tale," in fact, with some patience, you can balance eggs on their tips anytime, due to the tiny bumps in an eggshell's texture.
While brainstorming a theory related to the case, Castle tells Beckett "we could make meth... just like that cable show.". The "cable show" he is referring to is Breaking Bad (2008), a popular series where the main character is a chemistry teacher, much like this episode's victim, who turns to manufacturing and selling methamphetamine (which would be a similar storyline to Castle's theory).
The number on the second victim's hand is #227 - if you add up the first two numbers you get #47, a recurring number in the Castle universe.