I am underweight (100lb at 5ft 7in). Should I still exercise or focus on nutrition only? If I should exercise, which ones should I do?

Yes, exercise. Exercise is always a healthy thing to do. Good for heart health, blood sugar and cholesterol management, and energy and vitality. Being underweight, you may want to do aerobic type exercises three or four days weekly and focus on weight training, which will build muscle and shape and bring your weight up a bit through the building of dense muscle tissue. And please try to eat better.
Exercise. Every guy should exercise. "focusing on nutrition" will just make you fat without getting you strength. Eat plenty of protein and keep a well-balanced diet with adequate amounts of all nutrients; your physician can guide you. Both aerobic and resistance training will help you put on mass. If your sexual function is that of a normal young man, you have enough testosterone to build mass.
Both - d/w your DR. Eat healthy high calorie foods. Eat 6 meals/day. Work on strength training to build your large muscle groups. Workout w heavier weights w fewer repetitions. Sleep at least 8 to 9 hrs/night. Hydrate well w water. Foods to help w healthy weight gain: almonds, cashews, pecans, sunflower seeds, flax seeds, walnuts, hummus, avocados, granola, trail mix, dried fruits, extra virgin olive oil, canola oil.