Pumpkins have some interesting uses in Minecraft, which makes them worth growing. They can be used to summon Iron Golems, look at Enderman without aggravating them or turned into Pumpkin Pie.
Even though they can generate naturally, the chances of stumbling across them are often low. Compared to regular Crops like Wheat, they also grow different, as they require an empty space next to the Stem, where the Pumpkin will grow.
Best Pumpkin Farm Layout
One of the best and most efficient Pumpkin Farm layouts is with the Bullseye method. By placing a block of Water in the center, you can surround it with layers of Grass, Farmland, Grass and then Farmland again.

That way, the Water Block is able to hydrate every Farmland block. This method will allow you to plant 48 Pumpkin Seeds at once, with an average of 44 growing, as the inner corner Stems might struggle at times.

Once all of the Pumpkin Steps have grown a Pumpkin, it might look like the image above. The end-result of the above Farm was able to grow 46 Pumpkins. Though the randomness of this design means it might not be the prettiest.
Alternative Pumpkin Farm Layout
Another option is to use a Rows layout. With this method, you’ll be able to plant 44 Pumpkin Seeds from a single Water Block. They grow a bit neater too, as the layout is more uniform.

Compared to the Bullseye layout, this style also saves an additional row of space, which might be useful. You’ll still be left with some empty Grass Blocks in the middle, which is unavoidable with this design.

Your only alternative is to remove the 8 Pumpkin Stems that run alongside the Water Block, and possibly turn this into a pathed area instead. With whichever design you choose, you can later fortify the area using Fences, and light it up to stop hostile creatures spawning.