Summarize:

If you know why the dog is underweight, such as a bitch that has recently raised a litter of strong, greedy puppies, or a rescue dog has been mistreated, then fattening up the dog will be relatively straight forward. Be sure to monitor the dog who is underweight, so that you can find any issues that might be easy to fix. For example, if you have several dogs, the answer can be as simple as the other dogs stealing your underweight dog's food. All kinds of illnesses can interfere with the body's ability to process food and get the goodness out of it, leading to weight loss. If this is the case, the dog will almost certainly show some signs including decreased appetite, increased thirst, lack of energy, vomiting, diarrhea, or a change of body shape.  Conditions that can cause weight loss include lack of pancreatic enzymes, diabetes mellitus, liver disease, kidney disease, cancer, and inflammatory bowel disease.  Again, if you notice any of these symptoms then a vet check is for the best. If you suspect your dog is ill, or if you notice unexplained weight loss, it's best to consult a vet. If your dog suddenly has a poor appetite for no reason, it's also best to consult a professional before the problem gets out of control. Once the vet gives the all clear, and you know you just have a fussy dog, then there are a variety of strategies that can help improve its appetite.
Figure out if there is a logical reason your dog is underweight. Assess the overall health of your dog. Get your dog checked by a veterinarian.