You can look at the link below for all the information that you need:
Essentially, the person must have a valid reason for visiting, must have a way to support themselves without working illegally, must have significant ties to their home country, and must have the intent to return home.
A letter of invitation helps with some of this as it will help to show why the person is coming to the U.S., how much time they will need and that perhaps they will have a place to stay so they don't have to spend money. Usually you want to show that the person is going just for a few weeks or so. If it is longer than that, immigration will wonder why and will become suspicious. They are almost sure to deny someone that says they want to visit for 5 or 6 months unless they have very strong evidences of everything else I listed above.
So a letter of invitation should state why you are inviting them and that you will provide room and board while they are here visiting.
Now as to some of the ties, they will need to show that they have significant close family at home, property not easily sold, and a good job for a good company that they have had for awhile that a person would not normally abandon.
So if the person is young (or elderly and retired), without much money or any property, they could be denied. They would be a risk for staying illegal. Also, persons that are planning to travel with their spouse and children are a risk as well because some of their significant ties are actually going with them.
I mean some people have been approved with less, but I am trying to give you the idea for the best chance.