We consider atoms in two different periodic potentials induced by different lasers, one of which is coupled to a mechanical membrane via radiation pressure force. The atoms are intrinsically two-level systems that can absorb or emit photons, but the dynamics of their position and momentum are treated classically. On the other hand, the membrane, the cavity field, and the intrinsic two-level atoms are treated quantum mechanically. We show that the mean excitation of the three systems can be stable, periodically oscillating, or in a chaotic state depending on the strength of the coupling between them. We define regular,time-periodicl, and chaotic phases, and present a phase diagram where the three phases can be achieved by manipulating the field-membrane and field-atom coupling strengths. The first and second-order correlation functions in different phases are also calculated, which can be observed in experiments. Our proposal offers a new way to generate and tune time-periodic and chaotic phases in a well-established atom-optomechanics system.