When I try to place some seeds on farmland, it doesn't work sometimes. After pressing F3 and checking things, I came to the conclusion that its light level based. My base has some ambient darkness, but I also want a farm, but I can't place any crop on the farmland.
Linked issues
Comments

Since 1.13, you won't be able to plant crops when the light level is too low, and it wouldn't grow when the light level is below 9

Ah, I see. No ambience for me I guess.
Duplicate of MC-914, which was later resolved as "Works As Intended".

Thank you for your report!
We're tracking this issue in MC-914, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
This is working as intended.
Quote from the wiki: "If the light level is 7 or below, the crops un-plant themselves ("pop off"). It is not possible to plant seeds if the light level is too low."