Yes, but be certain to know ALL of the specific rules and regulations regarding a passport. In the U.S., for example, not only must the photo be of a very specific size, but the length from the base of the chin to the top of the head must also be of a very specific length. In addition, there cannot be any shadows behind the person's head.
So, yeah, if you follow ALL of the rules and regulations, you can easily use a smartphone to take a passport photo. Just be sure to submit your passport application well in advanced. Your application may get rejected, and if so, you will need to redo the image and wait another 4-6 weeks to have the application approved. It's quite possible that you will need 8-12 weeks to get your passport if your first application is denied due to your failure to comply with the photo regulations. This could result in you not getting a passport in time for your expensive trip - all because you wanted to save $15-$20 on a passport photo. In the big picture, $20 is nothing compared to what you're spending on a international trip.