Safety pins are allowed on airplanes if in your checked luggage. If you want to carry them with you into the cabin, the answer gets a little more complicated.
Safety pins are not on the TSA prohibited items list, therefore the policy regarding them comes down to individual airline policies. If you want them accessible during the flight, call the airline you are going to fly and find out how they handle that specific item. Otherwise, put them in your checked luggage and enjoy the flight.