As usual (for Lego games), you can just play through a level by yourself, and then plug in a second controller (don't forget to hit "Start"!) right before you finish a level. I personally did this on Black Rider, as it is one of the shortest levels in the game.
NOTE: I have found Lego games to be somewhat notorious for glitching the "Get 100% completion" achievement if you get minikits (or treasures, or red bricks, or...) while playing in co-op, so if you're going for 100% completion I would do this achievement last.
Additional notes from KP ScuzzyBunny and MysticWeirdo in the comments: This must be done in story mode, not free-play. Also, you can get this achievement by simply loading up a level, collecting a stud, and then from the menu selecting "Save & Quit". According to risseless the "Save & Quit" method was patched recently, so you'll just have to quickly play a level (which shouldn't take more than a few minutes anyway...)