At first glance the answer seems simple enough. After all, did we not receive the Torah precisely because angels cannot sin? As Moses retorted in his winning argument to the angels during his epic debate in heaven over who should receive the Torah. "It is written in the Torah 'Thou shall not murder,' 'Thou shall not commit adultery,' 'Thou shall not steal.'" Moses said. "Is there jealousy among you!? Do you have an evil inclination!? Obviously the Torah is not meant for you."1

In other words, only man has been endowed with the inclination for both good and bad. And only man has been given free choice to choose either one. An angel, on other hand, has no evil inclination and therefore no free choice. This would seem to mean that an angel is something like a robot, which cannot rebel or sin.

Even the oft-cited example of the Satan as a rogue angel is a gross misunderstanding. Satan is merely the name of an angel whose divinely assigned task is to seduce people towards sin. This angel is also the prosecutor who levels charges in front of the heavenly court against those who succumb to his crafty seductions. The word satan simply means prosecutor in Hebrew. If the Heavenly court decides that it is time for someone to die, then the Satan is the one sent down to take his life. In fact, the Talmud tells us that, "Satan, the urge to do evil, and the Angel of Death are all one."2 All these titles are simply multiple job descriptions for one angel. An angel fulfilling its divine duty is hardly in conflict with its own Creator.3

All this, however, is seemingly contradicted by the verse in Job which states:

Can a mortal be more righteous than God, or can a man be purer than his Maker? Behold, He does not trust His servants and He casts reproach upon His angels.4

And we say in the liturgy of Yom Kippur:

The angels are dismayed, they are seized by fear and trembling as they proclaim: Behold the Day of Judgment! For all the hosts of heaven are brought for judgment. They shall not be guiltless in Your eyes.

Both of these quotes clearly imply that in spite of what we have said, angels do somehow manage to sin even without having an evil inclination, and are judged on Yom Kippur.

Furthermore, we find various instances in the Midrash and Talmud of angels being punished. A punishment implies that one had a choice in the matter.

For example, the Midrash seeks an explanation for the verse concerning Jacob's dream, "And he dreamed, and behold, a ladder set up on the ground and its top reached to heaven; and behold, angels of God were ascending and descending upon it."5 This seems to be in reverse order. Shouldn't the angels have been descending first into this world from the place of their origin, and only afterward ascend?

Rabbi Chomah the son of Rabbi Chanina interpreted this reverse sequence as follows: When the angels who were sent down to save Lot and destroy Sodom, they were haughty and attributed the act to themselves, saying, "For we are destroying this place, because their cry has become great before the Lord, and the Lord has sent us to destroy it."6 Subsequently, they were punished and left to wander the world for 138 years. Only now, at the time of Jacob's dream,7 were they permitted to return. This is why the verse first says they were ascending and only afterwards descending.8 9

Punishment implies sin. If so, the above cited Midrash implies that angels can indeed and in fact did sin.

Rabbi Yeshaya Halevi Horowitz in his classic Shnei Luchot HaBrit (Shelah), provides an explanation. He concedes that angels do not have an evil inclination and, therefore, cannot sin in the conventional meaning of the word, deliberately contravening the will of their Creator. However, angels are creations of G‑d just like any other creation, albeit more spiritual and intellectually inclined creatures who live on a much higher plain than we do. By definition, there is no creation that is perfect; the only one that is perfect is the Creator. Every created being, even the highest intellect, in some way conceals the ultimate reality. Therefore, although an angel cannot sin, it can nevertheless make a mistake or at least present a distortion of the truth.10

An angel is not merely a robot; it is something like a robot with its own intelligence. Perhaps the best analogy would be one of those androids in sci-fi which have their own intelligence and yet are incapable of deliberately doing something contrary to the function for which they were designed—but nevertheless make mistakes.

This is how the angels who were sent to destroy Sodom sinned. When an angel is sent on a divine mission, it is meant to fulfill that duty while putting its own identity totally aside. However, when the angels went to destroy Sodom, they spoke as if they themselves were going to destroy the city. While this had no impact upon the actual mission, it nevertheless was considered a sin in that it distorted the truth of their role in that mission. This was an error due to their imperfections, rather than a failure to fulfill a divine mission.

Additionally, Rabbi Yonatan Eibshitz11 explains that there are two types of sins. The first is the most common kind, a sin that comes through the evil inclination enticing us to do wrong. But there is another sort of sin which does not come through the evil inclination; on the contrary, this sin is transgressed out of "holiness."

Every person—and every angel—has his or her level of understanding and holiness. A person is meant to strive to reach higher and higher along an ordered path. The problem arises when a being (whether human or angel) tries to rise too rapidly and reaches a level of revelation or understanding that acutely transcends his objective state of being. This, Rabbi Eibishitz writes, can be compared to one who drinks too much wine too fast, or "more than he can hold," which causes him—at best—to fall asleep, while if he would have sipped his wine slowly not only would nothing negative have happened, it would have even been beneficial to his health.12

This then sheds new light upon the meaning of the above cited verse in Job. The angels are reproached not so much for sins that they may have committed in the conventional sense. Rather, it is for sins done out of purity and righteousness, by seeking to rise to a level that is higher than their objective state of being, as the verse states, "Can a mortal be more righteous than God, or can a man be purer than his Maker?"13

So in answer to your question, yes angels can sin. However, they can only sin through mistaking their mission or trying to reach levels of revelation where they do not belong.