It's not easy to say, but there is a big problem with illegal immigration in the United States. It's hard to keep a secure border when the country to the south is a bit of a mess with a lot of drugs. Building a wall is at least a start and it stops some people.
People are going to come regardless, and receive help getting here from powers inside the US. There is too much money both in the drug trade, and in employing illegals for cheaper labor. If they can't walk then they will climb, dig, swim, be smuggled in on a boat, or sail all the way to Canada and walk down (It is too costly to maintain a blockade).
If you want to reduce the number of criminals and illegals you have to reduce the incentive. This means dealing with the labor and drug problems that cause it.
If you start bankrupting those who employ illegals to get around labor standards, and have a fine that is more than a slap to the wrist for those who employ illegals but keep labor standards, then you will greatly reduce the number of illegals in America and the negative competition for jobs. Alternatively (though bad for the country as a whole) you can reduce wages, and standard of living to below third world level and use the wall to keep American's in.
The next thing you have to deal with is the drug problem, which starts from marijuana (and is a fifth of the operation). If marijuana is no more damaging than occasional alcohol then it should be legalized and regulated. This would cut in to the cartels profits directly hopefully even harming them further. With a cheap legal alternative available, in place of the more harmful and expensive drugs. Thus dragging their prices down and making some things no longer profitable. Hopefully this would reduce the current drug runners power just like ending prohibition reduced the power of organized moonshiners (and even below this since penalties can be harsher).
There are no facts to support some claim that terrorists are trying to sneak across the US-Mexico border. Terrorists either recruit radicalizable American muslims who are already in the US, or they come to the US on proper visas, like the 911 murderers. I'd say this is all common knowledge, but that would be facetious for me to say so. It's just plain old truth.
A wall is going to make it harder for people to cross the border, but it isn't going to stop them. The people who want to come illegally into this country will find a way if they are desperate enough. They will scale the wall, they will dig tunnels, and they will smuggle in others way. A wall will only slow them down and make them more creative.
No, building a wall is not an effective way to secure the Mexican border. People who want to come to the U.S. will find a way to do so. There have already been huge tunnels discovered. Building the wall is less about securing the border and more about making a statement.