The DeploymentServerType paramater is optional (MSDN), if specified it restricts which servers on the farm your solution gets deployed to. If you have both App Server & Web Frontend components then just leave the parameter out so it gets deployed to ALL servers.
See the section "Solution Element" on the following blog article:
http://blogit.create.pt/blogs/andrevala/archive/2008/02/17/sharepoint-2007-deployment_3a00_-creating-solutions.aspx
"DeploymentServerType - Indicates which type of server is the target for the deployment of this solution. Can be ApplicationServer or WebFrontEnd. This attribute is optional (if not used, the solution is deployed to all the servers in the farm)"
EDIT: Thus logically if your solution just contains WFE content (Web parts, Pages, Images etc..) then you can use the WebFrontEnd parameter. If it contains AppServer content (Timer Jobs or anything deployed to Central Administration - eg. an extra administration page) then use the ApplicationServer parameter. Generally I find most solutions will be deployed to the WebFrontEnd.