The CG was done by a company called Animal Logic.
They used LEGO Digital Designer, a free computer program which allows users to build models using virtual LEGO bricks, in a computer-aided design (CAD) like manner. This allowed them to get high precession models and also the required bricks per model.
The created LEGO Digital Designer (LDD) files were then converted into a single mesh ('shell') to remove hidden geometry, unlike the orignal LDD models which consisted of unique bricks. These meshes where used to build the scenes.
The bricks themselves were separately modeled in Maya, with asset and layout builds achieved in Maya and XSI. They observed real used Lego to make the meshes and bricks look used/weared out (they even modeled bite marks on some bricks).
To get a more photo realistic look they again observed real Lego and used this information to place light sources tactically throughout the scene, enhancing the tear and wear look of the Lego. Furthermore, to mimic to stop motion they used virtual steadi-cams; the camera movement was then done using key framing.
As conclusion they used the following software:
- The Lego Digital Designer
Source and more info: http://www.animallogic.com/Studios/Work/The-LEGO%C2%AE-Movie