When it comes to third-country (i.e. non-EU) citizens, each member state remains essentially free to decide to whom they grant a long-stay visa or residence permit. There are only a couple of (very limited) exceptions grounded in EU law, namely the rights enjoyed by third-country nationals who are members of the family of EU citizens and the EU Blue Card program (which is designed to attract highly skilled migrants from outside the EU).
There is also a string of directives on asylum. In a way, these could be construed as creating an obligation for member states to accept a specific category of migrants (namely refugees) on their territories. But these directives merely implement much older international obligations that nobody really considered up for debate until recently.
And most importantly, EU law on asylum is very procedural in nature. Thus member states have to follow certain procedures (to give you an idea, imagine something like offering a way to appeal asylum decisions but there are many more arcane requirements) and follow the rules regarding equality of treatment defined in the Geneva Convention but individual decisions are still entirely in their hand. As long as they follow a reasonable process, they are still free to be as strict or as humane as they want to be (as evidence for that consider the almost unbelievable gap between the rate of success for people coming from the same country depending on where in the EU they applied for asylum).
Illegal entries is a completely different topic. It's arguably related in the sense that a more welcoming migration policy (including but not limited to a significant participation to resettlement efforts for refugees stuck in camps) could perhaps help reduce the pressure on border countries. But generally speaking border control is simply treated as a part of the EU security policy and efforts to secure the EU's external borders do not amount to anything resembling a “migration policy”.
Finally, there is something commonly called the “Return Directive” (2008/115/EC) “on common standards and procedures for returning illegally staying third-country nationals” which regulates some details of the way EU countries should conduct removals and deportations. Again, it's very procedural in nature and only impacts migration policy indirectly.