This is a topic that I have been asked frequently by parents and students. One of the most important factors to consider when you are buying a piano is the sound of the instrument. Unsurprisingly, acoustic piano produces a better sound. It gives you an authentic and acoustic sound which is warmer and more resonant. You also have a better control in terms of articulation and expression. On the other hand, although nowadays manufactories are very advanced, digital piano can only mimic the sound of the acoustic piano and doesn't allow for the same acoustic nuance.
For beginners, a good digital piano (88 keys, comes with wighted action and pedals) is still a good option. Digital piano is far cheaper, much lighter, quiet and doesn't bother your neighbour at night, never goes out of tune. However, if you are an intermediate or advanced student, definitely need to consider buying an acoustic piano. A quality acoustic piano cannot beaten on sound and feel.