if there is little or no light by crops, the crops seeds or item to plant them falls out and won't grow until there is enough light levels, it is hard to grow crops.
Comments 2
This is working as intended
A light level of 9 or higher in the block above the plant. This doesn't have to be sunlight, so torches will let crops grow at night or underground.
That's not a bug, it's a Minecraft feature.