As a matter of religious principal, Bahá'ís cannot defend themselves by harming someone else. "The Bahá'í Teachings, indeed, condemn, emphatically and unequivocally, any form of physical violence, and warfare in the battlefield is obviously a form, and perhaps the worst form which such violence can assume."
But they are also bound to obey their respective governments. How do members of the Bahá'í Faith manage this paradox? If asked to serve in the military, they do--but request non-combatant status. Since the number of service personnel involved in actual combat is far smaller than their fellows manning other tasks, this is not a huge problem in today's armed forces. Transportation, medical corps, communications, repair and maintenance, administration and a host of other professions are necessary to keep an army functioning.
So while Bahá'ís cannot voluntarily enlist in any branch of the Armed Forces where they would be ordered to kill, it is not that they won't obey their governments or support their country if it is attacked. Rather..."it is that we do not believe in, or wish to take part in, killing our fellow-men. We are not conscientious objectors at all, we will serve, but wish...to be classified as non-combatants."
While their country is not under attack, however: "...the believers, while expressing their readiness to unreservedly obey any directions that the authorities may issue concerning national service in time of war, should also, and while there is yet no outbreak of hostilities, appeal to the government for exemption from active military service in a combatant capacity, stressing the fact that in doing so they are not prompted by any selfish considerations, but by the sole and supreme motive of upholding the Teachings of their Faith, which make it a moral obligation for them to desist from any act that would involve them into direct warfare with their fellow-humans of any other race or nation."
Further, the request for non-combatant status is not cowardice or reluctance to come under fire. "It is immaterial whether such activities would still expose them to dangers, either at home or in the front, since their desire is not to protect their lives, but to desist from any acts of willful murder."
Nor is the decision not to use violence to solve problems a pacifist position. "...Bahá'ís recognize the right and duty of governments to use force for the maintenance of law and order and to protect their people. Thus, for a Bahá'í, the shedding of blood for such a purpose is not necessarily essentially wrong. The Bahá'í Faith draws a very definite distinction between the duty of an individual to forgive and 'to be killed rather than to kill' and the duty of society to uphold justice..."
Military service varies from country to country, and there may be times and places where non-combatant service is not a choice, in which case Bahá'ís obey their government directives. There are countries where a large part of military service provides infrastructure and support, particularly in times of natural disaster, to the general populace. In the United States, the armed forces offer specialized training in a great many useful trades. For some young people, this is their only chance to gain such job experience. So, "...there is no objection to a Bahá'í enlisting voluntarily in the armed forces of a country in order to obtain a training in some trade or profession, provided that he can do so without making himself liable to undertake combatant service. There is likewise no objection to a Bahá'í seeking or continuing a career in the armed forces, provided that he can do so without making himself liable to undertake combatant service."
I have several friends who are, in fact, serving in the US military--as translators, equipment technicians, doctors and nurses, pilots and communications specialists. What they do in non-combatant service makes a difference every day, both to fellow servicemen and to their country.
And ultimately, it is not guns that make peace, but service to our fellow man.
The above quotes are all from Lights of Guidance, pp. 405-8