In answering this question, we must first realize that not all middle class youths (or poorer youths) who become delinquent do so for the same reasons. Within either class, there can be a variety of causes of delinquency. Therefore, there will be cases in which middle class youths and poorer youths both become delinquent for the same reasons. However, generally speaking, the reasons for delinquency are different in the two classes of youths. (It is also important to note, though, that we cannot always be 100% sure as to why a given youth becomes delinquent.)
In general, lower class youths are more likely to become delinquent due to factors that are explained by anomie theory. This theory holds that our society is structured in such a way that delinquency is actually a viable adaptation for many people. This is particularly true among the lower classes. Let us imagine, for example, a lower class youth who aspires to become a doctor. The problem is that the deck is stacked against this person. The youth attends low-quality schools and has little social support to help them excel academically. The youth gradually comes to realize that their dream of becoming a doctor is hopeless. The youth then turns to delinquency because that is the most likely way to prestige and even to relative wealth that is available to them. This sort of cause of delinquency is most likely to occur among the lower classes because they are the ones with the fewest advantages in our society.
By contrast, we can argue that most middle class youths who become delinquent do so because they lack structure and organization in their lives. These youths do not have much to be angry about in the way that lower class youths do. However, they do have the same rebellious urges that all adolescents have. In some households, there is a lack of structure for adolescents. If the parents (even if both are in the home) do not have the time and the inclination to give their children attention, the children may not develop the sorts of self-control needed to avoid giving in to their rebellious urges. These youths may become delinquent largely because they have not had sufficient structure in their home lives. Their parents do not exert control and they do not teach the children how to control themselves.
Again, we can never be sure why any individual becomes delinquent. In addition, it is likely that people from any given class can become delinquent for a variety of reasons. Even so, we can generalize and say that different factors tend to cause delinquency in different classes of youths.