Border officials have a lot of power in the United States. They can and do turn many people away each and every day.
One reason they do it is if they think that you are lying to them. For instance, even if you have an immigration visa, something you say may cause the officials to think that you lied to get it. They can block you from entering. Don't give them a reason to think you're being dishonest or that you ever were in the past.
You also don't want to make them think you have goals other than what your papers allow. For example, perhaps you have a tourist visa and you do not plan to stay in the United States at this time. That's fine, but you don't want to pack luggage that makes them think you have other goals. If you have a job resume in your bag, they may think you're hoping to get a job and then overstay your visa to work illegally. If you have a wedding dress, they may think you plan to marry someone in the United States just so that you can stay.
Of course, one of the biggest things that the officials are looking for are people who may pose a security risk. Even when the process is frustrating, remain calm and collected. Never threaten the officials or make off-color jokes. If they get the slightest sense that something is wrong, they can stop you from entering the country.
Above all else, no matter why you are coming to America, make sure you know your rights and the ins and outs of immigration law.