John is almost right, They are sworn Federal Officers but their jurisdiction starts and stops at the "Secure Area" at an airport. They only have authority within those areas. They do not have the authority to arrest just detain and again only at an airport. This also only applies to Airline (Part 121) pilots who have gone threw the training.
Some Facts for you (Source is TSA site regarding FFDO):
FFDOs are considered Federal law enforcement officers only for the limited purposes of carrying firearms and using force, including lethal force, to defend the flight deck of an aircraft from air piracy or criminal violence.
FFDOs are not granted or authorized to exercise other law enforcement powers such as the power to make arrests, or seek or execute warrants for arrest, or seizure of evidence, or to otherwise act as Federal law enforcement outside the jurisdiction of aircraft flight decks.
FFDOs are issued credentials and badges to appropriately identify themselves to law enforcement and security personnel, as required in the furtherance of their mission.
FFDOs are issued firearms and other necessary equipment by the Federal Air Marshal Service.
FFDOs are responsible for the readiness and daily security of their firearms, credentials and equipment.
FFDOs are authorized to transport secured firearms in any state for a flight on which they are flying to or from as approved by the Federal Air Marshal Service as necessary for their participation and activities in the program.
http://www.tsa.gov/lawenforcement/programs/ffdo_information.shtm
Hope this helps, this only for Airline Pilots. Private, Charter and non-airline pilots will fall under company policy/state laws but there are no FAA Regulations that state a pilot of a private or commercial charter flight (non airline) can or cannot carry a firearm.