This type of shelf can be hung anywhere. But near a window, as seen here ... displays plants and works as a plant propagation ...
That's why these DIY glass window shelves by @womansworkco are so genius ... Keep stacking on more rails if you want a larger garden, and the plants can be rearranged on the rails as needed.