With the advent of techniques such as Stimulated Emission Depletion Microscopy (STED) and light sheet microscopy, the generation of specialised light beams has become an exciting field. However, while very effective methods of generating such beams exist, the components necessary to do so are generally large and cumbersome. Metasurfaces promise the replacement of these traditional bulky optical elements with sub-wavelength thick and flat alternatives, paving the way for integration into microscale form factors. Metasurfaces commonly use a distribution of nanoscale resonant elements to engineer a phase plate that shapes light through the Huygens' principle, allowing them to mimic and improve upon traditional optics. Initially, plasmonic resonant elements were explored by the community, but their dissipative losses have severely limited the efficiency of these devices. Here I discuss my work on the development of dielectric sub-wavelength grating based metasurfaces. Four types of metasurface, each using a different manifestation of grating physics are explored: direct phase, polarisation conversion, geometric phase, and active metasurfaces. I show that these different types of metasurface together allow the shaping of a wide variety of beams under a large range of different conditions, while retaining efficiencies on the order of 80-90%. Examples of the beam shapes explored include focused beams, vortex beams, Bessel beams and cylindrical vector beams. The development of high efficiency dielectric metasurfaces brings ultrathin optics closer to practical applications. Their materials and sizes facilitate the integration into previously unavailable form factors, including applications in microfluidics.