This comprehensive review explores the design and applications of machine learning techniques to acoustic metamaterials (AMs) and phononic crystals (PnCs), with a particular focus on deep learning. AMs and PnCs, characterized by artificially designed microstructures and geometries, offer unique acoustic properties for precise control and manipulation of sound waves. Machine learning, including deep learning, in combination with traditional artificial design have promoted the design process, enabling data-driven approaches for feature identification, design optimization, and intelligent parameter search. Machine learning algorithms process extensive acoustic metamaterial data to discover novel structures and properties, enhancing overall acoustic performance. This review presents an in-depth exploration of applications associated with machine learning techniques in AMs and PnCs, highlighting specific advantages, challenges and potential solutions of applying of using machine learning algorithms associated with machine learning techniques. By bridging acoustic engineering and machine learning, this review paves the way for future breakthroughs in acoustic research and engineering.