For most crops, a spacing of one block between each plant is sufficient. However, for crops like melons and pumpkins, you should leave a space of two blocks between each plant.