You can either import the Unity Package or just use the source code
How to use LevelGenerator:
Create a map / level that you want in Photoshop / Gimp, where 1 pixel of a certain color represents a tile / 3D object that you want to generate. This map should be a 1 for 1 pixel size to Unity units that you want to use
Import that asset into the Unity project, MAKE SURE THAT YOU HAVE READ / WRITE ENABLED
Drag and drop that texture map onto the
mapfield of the LevelGenerator prefab
Match up the color that you want to create and drop the prefab of the tile/object that you want to generate onto it.
Run the game, and it will be generated at runtime!
Note that is really meant to be used a rapid prototyping tool for 2D platforms or something like that, not necessarily for a final product.
Credit to Brackeys on YouTube for the idea