Nuclear reactors can be used for both peaceful and non-peaceful purposes. There are two paths to building a nuclear weapon, 1) A reactor's spent fuel can be reprocessed to extract plutonium, 2) enriching uranium in centrifuges. The Syrians were pursuing the former and Iran is being accused of pursuing the latter. Israel conducted a similar raid in 1981 when it destroyed the Osirak nuclear reactor in Iraq shortly before it was to have begun operating. Syria is a signatory to the Nuclear Nonproliferation Treaty, which gives it the right to construct nuclear plants to produce electricity.
This incident, along with the saber rattling about an Iranian centrifuge/reactor shows the importance of establishing an international program (GNEP) to manage nuclear fuel without the prospect of building nuclear weapons. Unless the rogue nations can somehow construct such a facility in complete secrecy (think Manhattan Project), they will always be destroyed by a stakeholder country.