I have an underground farm in a singleplayer world, and every time I try to plant carrots, potatoes, beets, etc. (except wheat) it just pops right out of the ground. I have the right lighting and amount of water. Any idea what's going on??
Most crops (excluding melon and pumpkin stems and saplings) require light to continue growing. Either a block light value of 8 or higher (enough to prevent darkness monsters from spawning) or a sky light level of 5 or higher (night with open sky above). If this requirement is not met the crops un-plant themselves ("pop off").
This is what the wiki says about planting seeds. Have you met this requirement? Also you state that every time you plant, the crop pops off. Is this for all the farmland blocks in your farm, or a particular one?
In order for farmland to stay hydrated, there needs to be a water source within 4 blocks north/south and 4 blocks east/west away from the farmland. You say that you have water, but is it close enough to your farmland?
If you have met both of these requirements, then you should get your plants growing. It may be worth to check out the light values for the other crops as well, since the wiki says that this is the value for most crops.
It's probably lag, just quit and rejoin and see if that works.
Plants Need "Sky Lighting" In order to grow. If you are underground and there is no Sky access then most likely there is 0 Sky lighting
You Can see how much sky lighting there is by looking on the "f3 Screen" or Debugger Screen. In the "Lighting" Row You will See Something Like this
Light: ? (? Sky, ? block)
Were it says Sky. Make sure the number to the left of it is greater than 0